Package org.apache.solr.search
Class DisMaxQParser
- java.lang.Object
- 
- org.apache.solr.search.QParser
- 
- org.apache.solr.search.DisMaxQParser
 
 
- 
 public class DisMaxQParser extends QParser Query parser for dismax queriesNote: This API is experimental and may change in non backward-compatible ways in the future 
- 
- 
Field SummaryFields Modifier and Type Field Description protected org.apache.lucene.search.QueryaltUserQueryprotected String[]boostParamsprotected List<org.apache.lucene.search.Query>boostQueriesprotected org.apache.lucene.search.QueryparsedUserQueryprotected Map<String,Float>queryFields- 
Fields inherited from class org.apache.solr.search.QParserFLAG_FILTER, flags, localParams, localParamsEnd, params, qstr, query, recurseCount, req, stringIncludingLocalParams, valFollowedParams
 
- 
 - 
Constructor SummaryConstructors Constructor Description DisMaxQParser(String qstr, org.apache.solr.common.params.SolrParams localParams, org.apache.solr.common.params.SolrParams params, SolrQueryRequest req)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddBoostFunctions(org.apache.lucene.search.BooleanQuery.Builder query, org.apache.solr.common.params.SolrParams solrParams)protected voidaddBoostQuery(org.apache.lucene.search.BooleanQuery.Builder query, org.apache.solr.common.params.SolrParams solrParams)voidaddDebugInfo(org.apache.solr.common.util.NamedList<Object> debugInfo)protected booleanaddMainQuery(org.apache.lucene.search.BooleanQuery.Builder query, org.apache.solr.common.params.SolrParams solrParams)Adds the main query to the query argument.protected org.apache.lucene.search.QuerygetAlternateUserQuery(org.apache.solr.common.params.SolrParams solrParams)String[]getDefaultHighlightFields()org.apache.lucene.search.QuerygetHighlightQuery()protected SolrPluginUtils.DisjunctionMaxQueryParsergetParser(Map<String,Float> fields, String paramName, org.apache.solr.common.params.SolrParams solrParams, float tiebreaker)protected org.apache.lucene.search.QuerygetPhraseQuery(String userQuery, SolrPluginUtils.DisjunctionMaxQueryParser pp)protected org.apache.lucene.search.QuerygetUserQuery(String userQuery, SolrPluginUtils.DisjunctionMaxQueryParser up, org.apache.solr.common.params.SolrParams solrParams)org.apache.lucene.search.Queryparse()Create and return theQueryobject represented byqstr.static StringparseMinShouldMatch(IndexSchema schema, org.apache.solr.common.params.SolrParams params)Applies the appropriate default rules for the "mm" param based on the effective value of the "q.op" paramstatic Map<String,Float>parseQueryFields(IndexSchema indexSchema, org.apache.solr.common.params.SolrParams solrParams)UsesSolrPluginUtils.parseFieldBoosts(String)with the 'qf' parameter.- 
Methods inherited from class org.apache.solr.search.QParsergetFlags, getLocalParams, getParam, getParams, getParser, getParser, getParser, getQuery, getReq, getSortSpec, getString, isFilter, setFlags, setIsFilter, setLocalParams, setParams, setReq, setString, subQuery
 
- 
 
- 
- 
- 
Constructor Detail- 
DisMaxQParserpublic DisMaxQParser(String qstr, org.apache.solr.common.params.SolrParams localParams, org.apache.solr.common.params.SolrParams params, SolrQueryRequest req) 
 
- 
 - 
Method Detail- 
parseMinShouldMatchpublic static String parseMinShouldMatch(IndexSchema schema, org.apache.solr.common.params.SolrParams params) Applies the appropriate default rules for the "mm" param based on the effective value of the "q.op" param- See Also:
- QueryParsing.OP,- DisMaxParams.MM
 
 - 
parseQueryFieldspublic static Map<String,Float> parseQueryFields(IndexSchema indexSchema, org.apache.solr.common.params.SolrParams solrParams) throws SyntaxError UsesSolrPluginUtils.parseFieldBoosts(String)with the 'qf' parameter. Falls back to the 'df' parameter- Throws:
- SyntaxError
 
 - 
parsepublic org.apache.lucene.search.Query parse() throws SyntaxErrorDescription copied from class:QParserCreate and return theQueryobject represented byqstr. Null MAY be returned to signify there was no input (e.g. no query string) to parse.- Specified by:
- parsein class- QParser
- Throws:
- SyntaxError
- See Also:
- QParser.getQuery()
 
 - 
addBoostFunctionsprotected void addBoostFunctions(org.apache.lucene.search.BooleanQuery.Builder query, org.apache.solr.common.params.SolrParams solrParams) throws SyntaxError- Throws:
- SyntaxError
 
 - 
addBoostQueryprotected void addBoostQuery(org.apache.lucene.search.BooleanQuery.Builder query, org.apache.solr.common.params.SolrParams solrParams) throws SyntaxError- Throws:
- SyntaxError
 
 - 
addMainQueryprotected boolean addMainQuery(org.apache.lucene.search.BooleanQuery.Builder query, org.apache.solr.common.params.SolrParams solrParams) throws SyntaxErrorAdds the main query to the query argument. If it's blank then false is returned.- Throws:
- SyntaxError
 
 - 
getAlternateUserQueryprotected org.apache.lucene.search.Query getAlternateUserQuery(org.apache.solr.common.params.SolrParams solrParams) throws SyntaxError- Throws:
- SyntaxError
 
 - 
getPhraseQueryprotected org.apache.lucene.search.Query getPhraseQuery(String userQuery, SolrPluginUtils.DisjunctionMaxQueryParser pp) throws SyntaxError - Throws:
- SyntaxError
 
 - 
getUserQueryprotected org.apache.lucene.search.Query getUserQuery(String userQuery, SolrPluginUtils.DisjunctionMaxQueryParser up, org.apache.solr.common.params.SolrParams solrParams) throws SyntaxError - Throws:
- SyntaxError
 
 - 
getParserprotected SolrPluginUtils.DisjunctionMaxQueryParser getParser(Map<String,Float> fields, String paramName, org.apache.solr.common.params.SolrParams solrParams, float tiebreaker) 
 - 
getDefaultHighlightFieldspublic String[] getDefaultHighlightFields() - Overrides:
- getDefaultHighlightFieldsin class- QParser
 
 - 
getHighlightQuerypublic org.apache.lucene.search.Query getHighlightQuery() throws SyntaxError- Overrides:
- getHighlightQueryin class- QParser
- Throws:
- SyntaxError
 
 - 
addDebugInfopublic void addDebugInfo(org.apache.solr.common.util.NamedList<Object> debugInfo) - Overrides:
- addDebugInfoin class- QParser
 
 
- 
 
-