public static class SolrPluginUtils.DisjunctionMaxQueryParser extends SolrQueryParser
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SolrPluginUtils.DisjunctionMaxQueryParser.Alias
A simple container for storing alias info
|
SolrQueryParser.MagicFieldName| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.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.
|
defaultField, parser, schemaAND_OPERATOR, jj_nt, OR_OPERATOR, token, token_source_ESCAPED_CHAR, _NUM_CHAR, _QUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AND, BAREOPER, 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 and Description |
|---|
DisjunctionMaxQueryParser(IndexSchema s) |
DisjunctionMaxQueryParser(IndexSchema s,
java.lang.String defaultField) |
DisjunctionMaxQueryParser(QParser qp,
java.lang.String defaultField) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAlias(java.lang.String field,
float tiebreaker,
java.util.Map<java.lang.String,java.lang.Float> fieldBoosts)
Add an alias to this query parser.
|
protected org.apache.lucene.search.Query |
getFieldQuery(java.lang.String field,
java.lang.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.
|
analyzeIfMultitermTermText, getPrefixQuery, getRangeQuery, getReversedWildcardFilterFactory, getWildcardQueryaddClause, 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, TopLevelQueryprotected java.util.Map<java.lang.String,SolrPluginUtils.DisjunctionMaxQueryParser.Alias> aliases
public DisjunctionMaxQueryParser(QParser qp, java.lang.String defaultField)
public DisjunctionMaxQueryParser(IndexSchema s, java.lang.String defaultField)
public DisjunctionMaxQueryParser(IndexSchema s)
public void addAlias(java.lang.String field,
float tiebreaker,
java.util.Map<java.lang.String,java.lang.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(java.lang.String field,
java.lang.String queryText,
boolean quoted)
throws org.apache.lucene.queryParser.ParseException
getFieldQuery in class SolrQueryParserorg.apache.lucene.queryParser.ParseException