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 queries
Note: This API is experimental and may change in non backward-compatible ways in the future
- Version:
- $Id: DisMaxQParser.java 1140724 2011-06-28 17:00:20Z yonik $
Method Summary |
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 void |
addMainQuery(org.apache.lucene.search.BooleanQuery query,
SolrParams solrParams)
|
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 |
Methods inherited from class org.apache.solr.search.QParser |
getLocalParams, getParam, getParams, getParser, getQuery, getReq, getSort, getString, setLocalParams, setParams, setReq, setString, subQuery |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
queryFields
protected Map<String,Float> queryFields
parsedUserQuery
protected org.apache.lucene.search.Query parsedUserQuery
boostParams
protected String[] boostParams
boostQueries
protected List<org.apache.lucene.search.Query> boostQueries
altUserQuery
protected org.apache.lucene.search.Query altUserQuery
altQParser
protected QParser altQParser
DisMaxQParser
public DisMaxQParser(String qstr,
SolrParams localParams,
SolrParams params,
SolrQueryRequest req)
parse
public org.apache.lucene.search.Query parse()
throws org.apache.lucene.queryParser.ParseException
- Description copied from class:
QParser
- Create and return the
Query
object represented by qstr
- Specified by:
parse
in class QParser
- Throws:
org.apache.lucene.queryParser.ParseException
- See Also:
QParser.getQuery()
addBoostFunctions
protected void addBoostFunctions(org.apache.lucene.search.BooleanQuery query,
SolrParams solrParams)
throws org.apache.lucene.queryParser.ParseException
- Throws:
org.apache.lucene.queryParser.ParseException
addBoostQuery
protected void addBoostQuery(org.apache.lucene.search.BooleanQuery query,
SolrParams solrParams)
throws org.apache.lucene.queryParser.ParseException
- Throws:
org.apache.lucene.queryParser.ParseException
addMainQuery
protected void addMainQuery(org.apache.lucene.search.BooleanQuery query,
SolrParams solrParams)
throws org.apache.lucene.queryParser.ParseException
- Throws:
org.apache.lucene.queryParser.ParseException
getAlternateUserQuery
protected org.apache.lucene.search.Query getAlternateUserQuery(SolrParams solrParams)
throws org.apache.lucene.queryParser.ParseException
- Throws:
org.apache.lucene.queryParser.ParseException
getPhraseQuery
protected org.apache.lucene.search.Query getPhraseQuery(String userQuery,
SolrPluginUtils.DisjunctionMaxQueryParser pp)
throws org.apache.lucene.queryParser.ParseException
- Throws:
org.apache.lucene.queryParser.ParseException
getUserQuery
protected org.apache.lucene.search.Query getUserQuery(String userQuery,
SolrPluginUtils.DisjunctionMaxQueryParser up,
SolrParams solrParams)
throws org.apache.lucene.queryParser.ParseException
- Throws:
org.apache.lucene.queryParser.ParseException
getParser
protected SolrPluginUtils.DisjunctionMaxQueryParser getParser(Map<String,Float> fields,
String paramName,
SolrParams solrParams,
float tiebreaker)
getDefaultHighlightFields
public String[] getDefaultHighlightFields()
- Overrides:
getDefaultHighlightFields
in class QParser
getHighlightQuery
public org.apache.lucene.search.Query getHighlightQuery()
throws org.apache.lucene.queryParser.ParseException
- Overrides:
getHighlightQuery
in class QParser
- Throws:
org.apache.lucene.queryParser.ParseException
addDebugInfo
public void addDebugInfo(NamedList<Object> debugInfo)
- Overrides:
addDebugInfo
in class QParser
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.