public static class ExtendedDismaxQParser.ExtendedSolrQueryParser extends SolrQueryParser
Modifier and Type | Class and Description |
---|---|
protected static class |
ExtendedDismaxQParser.ExtendedSolrQueryParser.Alias
A simple container for storing alias info
|
QueryParser.Operator
SolrQueryParserBase.MagicFieldName, SolrQueryParserBase.RawQuery, SolrQueryParserBase.SynonymQueryStyle
QueryBuilder.TermAndBoost
Modifier and Type | Field and Description |
---|---|
protected Map<String,ExtendedDismaxQParser.ExtendedSolrQueryParser.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.
|
DEFAULT_SPLIT_ON_WHITESPACE, jj_nt, token, token_source
AND_OPERATOR, explicitField, operator, OR_OPERATOR, parser, REVERSE_WILDCARD_LOWER_BOUND, schema, synonymQueryStyle, TERMS_QUERY_THRESHOLD
analyzer, autoGenerateMultiTermSynonymsPhraseQuery, enableGraphQueries, enablePositionIncrements
_ESCAPED_CHAR, _NUM_CHAR, _QUOTED_CHAR, _SQUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AND, BAREOPER, Boost, CARAT, COLON, COMMENT, DEFAULT, EOF, FILTER, FUZZY_SLOP, LPARAMS, LPAREN, MINUS, NOT, NUMBER, OR, PLUS, PREFIXTERM, QUOTED, Range, RANGE_GOOP, RANGE_QUOTED, RANGE_TO, RANGEEX_END, RANGEEX_START, RANGEIN_END, RANGEIN_START, REGEXPTERM, RPAREN, STAR, TERM, tokenImage, WILDTERM
Constructor and Description |
---|
ExtendedSolrQueryParser(QParser parser,
String defaultField) |
Modifier and Type | Method and Description |
---|---|
void |
addAlias(String field,
float tiebreaker,
Map<String,Float> fieldBoosts)
Add an alias to this query parser.
|
protected void |
addMultiTermClause(List<BooleanClause> clauses,
Query q)
Called from QueryParser's MultiTerm rule.
|
protected ExtendedDismaxQParser.ExtendedSolrQueryParser.Alias |
getAlias(String field)
Returns the aliases found for a field.
|
protected Query |
getAliasedMultiTermQuery()
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.
|
protected Query |
getAliasedQuery()
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.
|
protected Query |
getBooleanQuery(List<BooleanClause> clauses)
Factory method for generating query, given a set of clauses.
|
protected Query |
getFieldQuery(String field,
List<String> queryTerms,
boolean raw) |
protected Query |
getFieldQuery(String field,
String val,
boolean quoted,
boolean raw) |
protected Query |
getFieldQuery(String field,
String val,
int slop)
Base implementation delegates to
SolrQueryParserBase.getFieldQuery(String,String,boolean,boolean) . |
protected Query |
getFuzzyQuery(String field,
String val,
float minSimilarity) |
protected List<Query> |
getMultiTermQueries(ExtendedDismaxQParser.ExtendedSolrQueryParser.Alias a) |
protected Query |
getPrefixQuery(String field,
String val) |
protected List<Query> |
getQueries(ExtendedDismaxQParser.ExtendedSolrQueryParser.Alias a) |
protected Query |
getRangeQuery(String field,
String a,
String b,
boolean startInclusive,
boolean endInclusive) |
protected Query |
getWildcardQuery(String field,
String val) |
protected Query |
newFieldQuery(Analyzer analyzer,
String field,
String queryText,
boolean quoted,
boolean fieldAutoGenPhraseQueries,
boolean enableGraphQueries,
SolrQueryParserBase.SynonymQueryStyle synonymQueryStyle) |
void |
setRemoveStopFilter(boolean remove) |
Clause, Conjunction, disable_tracing, enable_tracing, generateParseException, getNextToken, getSplitOnWhitespace, getToken, Modifiers, MultiTerm, Query, ReInit, ReInit, setSplitOnWhitespace, Term, TopLevelQuery
addClause, analyzeIfMultitermTermText, escape, getAllowLeadingWildcard, getAutoGeneratePhraseQueries, getDefaultField, getDefaultOperator, getExistenceQuery, getExplicitField, getField, getFieldQuery, getFuzzyMinSim, getFuzzyPrefixLength, getLocalParams, getMultiTermRewriteMethod, getPhraseSlop, getRangeQueryImpl, getRegexpQuery, getReversedWildcardFilterFactory, getSynonymQueryStyle, init, isAllowSubQueryParsing, isRangeShouldBeProtectedFromReverse, newBooleanClause, newFuzzyQuery, newGraphSynonymQuery, newMatchAllDocsQuery, newPrefixQuery, newRegexpQuery, newSynonymQuery, newWildcardQuery, parse, setAllowLeadingWildcard, setAllowSubQueryParsing, setAutoGeneratePhraseQueries, setDefaultOperator, setFuzzyMinSim, setFuzzyPrefixLength, setMultiTermRewriteMethod, setPhraseSlop, setSynonymQueryStyle
add, analyzeBoolean, analyzeGraphBoolean, analyzeGraphPhrase, analyzeMultiBoolean, analyzeMultiPhrase, analyzePhrase, analyzeTerm, createBooleanQuery, createBooleanQuery, createFieldQuery, createFieldQuery, createMinShouldMatchQuery, createPhraseQuery, createPhraseQuery, createSpanQuery, getAnalyzer, getAutoGenerateMultiTermSynonymsPhraseQuery, getEnableGraphQueries, getEnablePositionIncrements, newBooleanQuery, newMultiPhraseQueryBuilder, newTermQuery, setAnalyzer, setAutoGenerateMultiTermSynonymsPhraseQuery, setEnableGraphQueries, setEnablePositionIncrements
protected Map<String,ExtendedDismaxQParser.ExtendedSolrQueryParser.Alias> aliases
public void setRemoveStopFilter(boolean remove)
protected Query getBooleanQuery(List<BooleanClause> clauses) throws SyntaxError
SolrQueryParserBase
getBooleanQuery
in class SolrQueryParserBase
clauses
- List that contains BooleanClause
instances
to join.Query
object.SyntaxError
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 ExtendedDismaxQParser.ExtendedSolrQueryParser.Alias getAlias(String field)
protected Query getFieldQuery(String field, String val, boolean quoted, boolean raw) throws SyntaxError
getFieldQuery
in class SolrQueryParserBase
SyntaxError
protected Query getFieldQuery(String field, String val, int slop) throws SyntaxError
SolrQueryParserBase
SolrQueryParserBase.getFieldQuery(String,String,boolean,boolean)
.
This method may be overridden, for example, to return
a SpanNearQuery instead of a PhraseQuery.getFieldQuery
in class SolrQueryParserBase
SyntaxError
protected Query getFieldQuery(String field, List<String> queryTerms, boolean raw) throws SyntaxError
getFieldQuery
in class SolrQueryParserBase
SyntaxError
protected Query getPrefixQuery(String field, String val) throws SyntaxError
getPrefixQuery
in class SolrQueryParserBase
SyntaxError
protected Query newFieldQuery(Analyzer analyzer, String field, String queryText, boolean quoted, boolean fieldAutoGenPhraseQueries, boolean enableGraphQueries, SolrQueryParserBase.SynonymQueryStyle synonymQueryStyle) throws SyntaxError
newFieldQuery
in class QueryParser
SyntaxError
protected Query getRangeQuery(String field, String a, String b, boolean startInclusive, boolean endInclusive) throws SyntaxError
getRangeQuery
in class SolrQueryParserBase
SyntaxError
protected Query getWildcardQuery(String field, String val) throws SyntaxError
getWildcardQuery
in class SolrQueryParserBase
SyntaxError
protected Query getFuzzyQuery(String field, String val, float minSimilarity) throws SyntaxError
getFuzzyQuery
in class SolrQueryParserBase
SyntaxError
protected Query getAliasedQuery() throws SyntaxError
SyntaxError
protected Query getAliasedMultiTermQuery() throws SyntaxError
SyntaxError
protected void addMultiTermClause(List<BooleanClause> clauses, Query q)
SolrQueryParserBase
addMultiTermClause
in class SolrQueryParserBase
protected List<Query> getQueries(ExtendedDismaxQParser.ExtendedSolrQueryParser.Alias a) throws SyntaxError
SyntaxError
protected List<Query> getMultiTermQueries(ExtendedDismaxQParser.ExtendedSolrQueryParser.Alias a) throws SyntaxError
SyntaxError
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.