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 802424 2009-08-08 17:20:43Z yonik $
Method Summary |
protected void |
addBoostFunctions(BooleanQuery query,
org.apache.solr.common.params.SolrParams solrParams)
|
protected void |
addBoostQuery(BooleanQuery query,
org.apache.solr.common.params.SolrParams solrParams)
|
void |
addDebugInfo(org.apache.solr.common.util.NamedList<Object> debugInfo)
|
protected void |
addMainQuery(BooleanQuery query,
org.apache.solr.common.params.SolrParams solrParams)
|
protected Query |
getAlternateUserQuery(org.apache.solr.common.params.SolrParams solrParams)
|
String[] |
getDefaultHighlightFields()
|
Query |
getHighlightQuery()
|
protected SolrPluginUtils.DisjunctionMaxQueryParser |
getParser(Map<String,Float> fields,
String paramName,
org.apache.solr.common.params.SolrParams solrParams,
float tiebreaker)
|
protected Query |
getPhraseQuery(String userQuery,
SolrPluginUtils.DisjunctionMaxQueryParser pp)
|
protected Query |
getUserQuery(String userQuery,
SolrPluginUtils.DisjunctionMaxQueryParser up,
org.apache.solr.common.params.SolrParams solrParams)
|
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 Query parsedUserQuery
boostParams
protected String[] boostParams
boostQueries
protected List<Query> boostQueries
altUserQuery
protected Query altUserQuery
altQParser
protected QParser altQParser
DisMaxQParser
public DisMaxQParser(String qstr,
org.apache.solr.common.params.SolrParams localParams,
org.apache.solr.common.params.SolrParams params,
SolrQueryRequest req)
parse
public Query parse()
throws ParseException
- Description copied from class:
QParser
- Create and return the
Query
object represented by qstr
- Specified by:
parse
in class QParser
- Throws:
ParseException
- See Also:
QParser.getQuery()
addBoostFunctions
protected void addBoostFunctions(BooleanQuery query,
org.apache.solr.common.params.SolrParams solrParams)
throws ParseException
- Throws:
ParseException
addBoostQuery
protected void addBoostQuery(BooleanQuery query,
org.apache.solr.common.params.SolrParams solrParams)
throws ParseException
- Throws:
ParseException
addMainQuery
protected void addMainQuery(BooleanQuery query,
org.apache.solr.common.params.SolrParams solrParams)
throws ParseException
- Throws:
ParseException
getAlternateUserQuery
protected Query getAlternateUserQuery(org.apache.solr.common.params.SolrParams solrParams)
throws ParseException
- Throws:
ParseException
getPhraseQuery
protected Query getPhraseQuery(String userQuery,
SolrPluginUtils.DisjunctionMaxQueryParser pp)
throws ParseException
- Throws:
ParseException
getUserQuery
protected Query getUserQuery(String userQuery,
SolrPluginUtils.DisjunctionMaxQueryParser up,
org.apache.solr.common.params.SolrParams solrParams)
throws ParseException
- Throws:
ParseException
getParser
protected SolrPluginUtils.DisjunctionMaxQueryParser getParser(Map<String,Float> fields,
String paramName,
org.apache.solr.common.params.SolrParams solrParams,
float tiebreaker)
getDefaultHighlightFields
public String[] getDefaultHighlightFields()
- Overrides:
getDefaultHighlightFields
in class QParser
getHighlightQuery
public Query getHighlightQuery()
throws ParseException
- Overrides:
getHighlightQuery
in class QParser
- Throws:
ParseException
addDebugInfo
public void addDebugInfo(org.apache.solr.common.util.NamedList<Object> debugInfo)
- Overrides:
addDebugInfo
in class QParser
Copyright © 2009 Apache Software Foundation. All Rights Reserved.