|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.queryParser.QueryParser
org.apache.solr.search.SolrQueryParser
org.apache.solr.util.SolrPluginUtils.DisjunctionMaxQueryParser
public static class SolrPluginUtils.DisjunctionMaxQueryParser
A subclass of SolrQueryParser that supports aliasing fields for constructing DisjunctionMaxQueries.
| Nested Class Summary | |
|---|---|
protected static class |
SolrPluginUtils.DisjunctionMaxQueryParser.Alias
A simple container for storing alias info |
| Nested classes/interfaces inherited from class org.apache.lucene.queryParser.QueryParser |
|---|
org.apache.lucene.queryParser.QueryParser.Operator |
| Field Summary | |
|---|---|
protected Map<String,SolrPluginUtils.DisjunctionMaxQueryParser.Alias> |
aliases
Where we store a map from field name we expect to see in our query string, to Alias object containing the fields to use in our DisjunctionMaxQuery and the tiebreaker to use. |
| Fields inherited from class org.apache.solr.search.SolrQueryParser |
|---|
defaultField, leadingWildcards, parser, schema |
| Fields inherited from class org.apache.lucene.queryParser.QueryParser |
|---|
AND_OPERATOR, jj_nt, OR_OPERATOR, token, token_source |
| Fields inherited from interface org.apache.lucene.queryParser.QueryParserConstants |
|---|
_ESCAPED_CHAR, _NUM_CHAR, _QUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AND, Boost, CARAT, COLON, DEFAULT, EOF, FUZZY_SLOP, LPAREN, MINUS, NOT, NUMBER, OR, PLUS, PREFIXTERM, QUOTED, RangeEx, RANGEEX_END, RANGEEX_GOOP, RANGEEX_QUOTED, RANGEEX_START, RANGEEX_TO, RangeIn, RANGEIN_END, RANGEIN_GOOP, RANGEIN_QUOTED, RANGEIN_START, RANGEIN_TO, RPAREN, STAR, TERM, tokenImage, WILDTERM |
| Constructor Summary | |
|---|---|
SolrPluginUtils.DisjunctionMaxQueryParser(IndexSchema s)
|
|
SolrPluginUtils.DisjunctionMaxQueryParser(IndexSchema s,
String defaultField)
|
|
SolrPluginUtils.DisjunctionMaxQueryParser(QParser qp,
String defaultField)
|
|
| Method Summary | |
|---|---|
void |
addAlias(String field,
float tiebreaker,
Map<String,Float> fieldBoosts)
Add an alias to this query parser. |
protected org.apache.lucene.search.Query |
getFieldQuery(String field,
String queryText,
boolean quoted)
Delegates to the super class unless the field has been specified as an alias -- in which case we recurse on each of the aliased fields, and the results are composed into a DisjunctionMaxQuery. |
| Methods inherited from class org.apache.solr.search.SolrQueryParser |
|---|
checkAllowLeadingWildcards, getPrefixQuery, getRangeQuery, getWildcardQuery |
| Methods inherited from class org.apache.lucene.queryParser.QueryParser |
|---|
addClause, Clause, Conjunction, disable_tracing, enable_tracing, escape, generateParseException, getAllowLeadingWildcard, getAnalyzer, getAutoGeneratePhraseQueries, getBooleanQuery, getBooleanQuery, getDateResolution, getDefaultOperator, getEnablePositionIncrements, getField, getFieldQuery, getFieldQuery, getFuzzyMinSim, getFuzzyPrefixLength, getFuzzyQuery, getLocale, getLowercaseExpandedTerms, getMultiTermRewriteMethod, getNextToken, getPhraseSlop, getRangeCollator, getToken, main, Modifiers, newBooleanClause, newBooleanQuery, newFuzzyQuery, newMatchAllDocsQuery, newMultiPhraseQuery, newPhraseQuery, newPrefixQuery, newRangeQuery, newTermQuery, newWildcardQuery, parse, Query, ReInit, ReInit, setAllowLeadingWildcard, setAutoGeneratePhraseQueries, setDateResolution, setDateResolution, setDefaultOperator, setEnablePositionIncrements, setFuzzyMinSim, setFuzzyPrefixLength, setLocale, setLowercaseExpandedTerms, setMultiTermRewriteMethod, setPhraseSlop, setRangeCollator, Term, TopLevelQuery |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<String,SolrPluginUtils.DisjunctionMaxQueryParser.Alias> aliases
| Constructor Detail |
|---|
public SolrPluginUtils.DisjunctionMaxQueryParser(QParser qp,
String defaultField)
public SolrPluginUtils.DisjunctionMaxQueryParser(IndexSchema s,
String defaultField)
public SolrPluginUtils.DisjunctionMaxQueryParser(IndexSchema s)
| Method Detail |
|---|
public void addAlias(String field,
float tiebreaker,
Map<String,Float> fieldBoosts)
field - the field name that should trigger alias mappingfieldBoosts - the mapping from fieldname to boost value that
should be used to build up the clauses of the
DisjunctionMaxQuery.tiebreaker - to the tiebreaker to be used in the
DisjunctionMaxQuerySolrPluginUtils.parseFieldBoosts(java.lang.String)
protected org.apache.lucene.search.Query getFieldQuery(String field,
String queryText,
boolean quoted)
throws org.apache.lucene.queryParser.ParseException
getFieldQuery in class SolrQueryParserorg.apache.lucene.queryParser.ParseException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||