public class DisMaxQParser extends QParser
Note: This API is experimental and may change in non backward-compatible ways in the future
| Modifier and Type | Field and Description |
|---|---|
protected Query |
altUserQuery |
protected String[] |
boostParams |
protected List<Query> |
boostQueries |
protected Query |
parsedUserQuery |
protected Map<String,Float> |
queryFields |
FLAG_FILTER, flags, 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(BooleanQuery.Builder query,
SolrParams solrParams) |
protected void |
addBoostQuery(BooleanQuery.Builder query,
SolrParams solrParams) |
void |
addDebugInfo(NamedList<Object> debugInfo) |
protected boolean |
addMainQuery(BooleanQuery.Builder query,
SolrParams solrParams)
Adds the main query to the query argument.
|
protected Query |
getAlternateUserQuery(SolrParams solrParams) |
String[] |
getDefaultHighlightFields() |
Query |
getHighlightQuery() |
protected SolrPluginUtils.DisjunctionMaxQueryParser |
getParser(Map<String,Float> fields,
String paramName,
SolrParams solrParams,
float tiebreaker) |
protected Query |
getPhraseQuery(String userQuery,
SolrPluginUtils.DisjunctionMaxQueryParser pp) |
protected Query |
getUserQuery(String userQuery,
SolrPluginUtils.DisjunctionMaxQueryParser up,
SolrParams solrParams) |
Query |
parse()
Create and return the
Query object represented by qstr. |
static String |
parseMinShouldMatch(IndexSchema schema,
SolrParams params)
Applies the appropriate default rules for the "mm" param based on the
effective value of the "q.op" param
|
static Map<String,Float> |
parseQueryFields(IndexSchema indexSchema,
SolrParams solrParams)
Uses
SolrPluginUtils.parseFieldBoosts(String) with the 'qf' parameter. |
getFlags, getLocalParams, getParam, getParams, getParser, getParser, getParser, getQuery, getReq, getSortSpec, getString, isFilter, setFlags, setIsFilter, setLocalParams, setParams, setReq, setString, subQueryprotected Query parsedUserQuery
protected String[] boostParams
protected Query altUserQuery
public DisMaxQParser(String qstr, SolrParams localParams, SolrParams params, SolrQueryRequest req)
public static String parseMinShouldMatch(IndexSchema schema, SolrParams params)
QueryParsing.OP,
DisMaxParams.MMpublic static Map<String,Float> parseQueryFields(IndexSchema indexSchema, SolrParams solrParams) throws SyntaxError
SolrPluginUtils.parseFieldBoosts(String) with the 'qf' parameter. Falls back to the 'df' parameterSyntaxErrorpublic Query parse() throws SyntaxError
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 QParserSyntaxErrorQParser.getQuery()protected void addBoostFunctions(BooleanQuery.Builder query, SolrParams solrParams) throws SyntaxError
SyntaxErrorprotected void addBoostQuery(BooleanQuery.Builder query, SolrParams solrParams) throws SyntaxError
SyntaxErrorprotected boolean addMainQuery(BooleanQuery.Builder query, SolrParams solrParams) throws SyntaxError
SyntaxErrorprotected Query getAlternateUserQuery(SolrParams solrParams) throws SyntaxError
SyntaxErrorprotected Query getPhraseQuery(String userQuery, SolrPluginUtils.DisjunctionMaxQueryParser pp) throws SyntaxError
SyntaxErrorprotected Query getUserQuery(String userQuery, SolrPluginUtils.DisjunctionMaxQueryParser up, SolrParams solrParams) throws SyntaxError
SyntaxErrorprotected SolrPluginUtils.DisjunctionMaxQueryParser getParser(Map<String,Float> fields, String paramName, SolrParams solrParams, float tiebreaker)
public String[] getDefaultHighlightFields()
getDefaultHighlightFields in class QParserpublic Query getHighlightQuery() throws SyntaxError
getHighlightQuery in class QParserSyntaxErrorpublic void addDebugInfo(NamedList<Object> debugInfo)
addDebugInfo in class QParserCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.