public class DisMaxQParser extends QParser
| Modifier and Type | Field and Description |
|---|---|
protected QParser |
altQParser |
protected org.apache.lucene.search.Query |
altUserQuery |
protected String[] |
boostParams |
protected List<org.apache.lucene.search.Query> |
boostQueries |
protected org.apache.lucene.search.Query |
parsedUserQuery |
protected Map<String,Float> |
queryFields |
localParams, localParamsEnd, params, qstr, query, recurseCount, req, stringIncludingLocalParams, valFollowedParams| Constructor and Description |
|---|
DisMaxQParser(String qstr,
SolrParams localParams,
SolrParams params,
SolrQueryRequest req) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBoostFunctions(org.apache.lucene.search.BooleanQuery query,
SolrParams solrParams) |
protected void |
addBoostQuery(org.apache.lucene.search.BooleanQuery query,
SolrParams solrParams) |
void |
addDebugInfo(NamedList<Object> debugInfo) |
protected boolean |
addMainQuery(org.apache.lucene.search.BooleanQuery query,
SolrParams solrParams)
Adds the main query to the query argument.
|
protected org.apache.lucene.search.Query |
getAlternateUserQuery(SolrParams solrParams) |
String[] |
getDefaultHighlightFields() |
org.apache.lucene.search.Query |
getHighlightQuery() |
protected SolrPluginUtils.DisjunctionMaxQueryParser |
getParser(Map<String,Float> fields,
String paramName,
SolrParams solrParams,
float tiebreaker) |
protected org.apache.lucene.search.Query |
getPhraseQuery(String userQuery,
SolrPluginUtils.DisjunctionMaxQueryParser pp) |
protected org.apache.lucene.search.Query |
getUserQuery(String userQuery,
SolrPluginUtils.DisjunctionMaxQueryParser up,
SolrParams solrParams) |
org.apache.lucene.search.Query |
parse()
Create and return the
Query object represented by qstr. |
protected org.apache.lucene.search.Query parsedUserQuery
protected String[] boostParams
protected List<org.apache.lucene.search.Query> boostQueries
protected org.apache.lucene.search.Query altUserQuery
protected QParser altQParser
public DisMaxQParser(String qstr, SolrParams localParams, SolrParams params, SolrQueryRequest req)
public org.apache.lucene.search.Query parse()
throws org.apache.lucene.queryParser.ParseException
QParserQuery object represented by qstr. Null MAY be returned to signify
there was no input (e.g. no query string) to parse.parse in class QParserorg.apache.lucene.queryParser.ParseExceptionQParser.getQuery()protected void addBoostFunctions(org.apache.lucene.search.BooleanQuery query,
SolrParams solrParams)
throws org.apache.lucene.queryParser.ParseException
org.apache.lucene.queryParser.ParseExceptionprotected void addBoostQuery(org.apache.lucene.search.BooleanQuery query,
SolrParams solrParams)
throws org.apache.lucene.queryParser.ParseException
org.apache.lucene.queryParser.ParseExceptionprotected boolean addMainQuery(org.apache.lucene.search.BooleanQuery query,
SolrParams solrParams)
throws org.apache.lucene.queryParser.ParseException
org.apache.lucene.queryParser.ParseExceptionprotected org.apache.lucene.search.Query getAlternateUserQuery(SolrParams solrParams) throws org.apache.lucene.queryParser.ParseException
org.apache.lucene.queryParser.ParseExceptionprotected org.apache.lucene.search.Query getPhraseQuery(String userQuery, SolrPluginUtils.DisjunctionMaxQueryParser pp) throws org.apache.lucene.queryParser.ParseException
org.apache.lucene.queryParser.ParseExceptionprotected org.apache.lucene.search.Query getUserQuery(String userQuery, SolrPluginUtils.DisjunctionMaxQueryParser up, SolrParams solrParams) throws org.apache.lucene.queryParser.ParseException
org.apache.lucene.queryParser.ParseExceptionprotected SolrPluginUtils.DisjunctionMaxQueryParser getParser(Map<String,Float> fields, String paramName, SolrParams solrParams, float tiebreaker)
public String[] getDefaultHighlightFields()
getDefaultHighlightFields in class QParserpublic org.apache.lucene.search.Query getHighlightQuery()
throws org.apache.lucene.queryParser.ParseException
getHighlightQuery in class QParserorg.apache.lucene.queryParser.ParseExceptionpublic void addDebugInfo(NamedList<Object> debugInfo)
addDebugInfo in class QParser