Package | Description |
---|---|
org.apache.lucene.queryParser.core |
Contains the core classes of the flexible query parser framework
Flexible Query Parser
This package contains the necessary classes to implement a query parser.
|
org.apache.lucene.queryParser.core.processors |
Interfaces and implementations used by query node processors
Query Node Processors
The package org.apache.lucene.queryParser.processors contains interfaces
that should be implemented by every query node processor.
|
org.apache.lucene.queryParser.precedence.processors |
This package contains the processors used by Precedence Query Parser
Lucene Precedence Query Parser Processors
This package contains the 2
QueryNodeProcessor s used by
PrecedenceQueryParser . |
org.apache.lucene.queryParser.standard |
Contains the implementation of the Lucene query parser using the flexible query parser frameworks
Lucene Flexible Query Parser Implementation
The old Lucene query parser used to have only one class that performed
all the parsing operations.
|
org.apache.lucene.queryParser.standard.processors |
Lucene Query Node Processors
The package org.apache.lucene.queryParser.standard.processors contains every processor needed to assembly a pipeline
that modifies the query node tree according to the actual Lucene queries.
|
Modifier and Type | Method and Description |
---|---|
QueryNodeProcessor |
QueryParserHelper.getQueryNodeProcessor()
Returns the processor object used to process the query node tree, it
returns
null if no processor is used. |
Modifier and Type | Method and Description |
---|---|
void |
QueryParserHelper.setQueryNodeProcessor(QueryNodeProcessor processor)
Sets the processor that will be used to process the query node tree.
|
Constructor and Description |
---|
QueryParserHelper(QueryConfigHandler queryConfigHandler,
SyntaxParser syntaxParser,
QueryNodeProcessor processor,
QueryBuilder builder)
Creates a query parser helper object using the specified configuration,
text parser, processor and builder.
|
Modifier and Type | Class and Description |
---|---|
class |
NoChildOptimizationQueryNodeProcessor
A
NoChildOptimizationQueryNodeProcessor removes every
BooleanQueryNode, BoostQueryNode, TokenizedPhraseQueryNode or
ModifierQueryNode that do not have a valid children. |
class |
QueryNodeProcessorImpl
This is a default implementation for the
QueryNodeProcessor
interface, it's an abstract class, so it should be extended by classes that
want to process a QueryNode tree. |
class |
QueryNodeProcessorPipeline
A
QueryNodeProcessorPipeline class should be used to build a query
node processor pipeline. |
class |
RemoveDeletedQueryNodesProcessor
A
QueryNodeProcessorPipeline class removes every instance of
DeletedQueryNode from a query node tree. |
Modifier and Type | Method and Description |
---|---|
QueryNodeProcessor |
QueryNodeProcessorPipeline.get(int index) |
QueryNodeProcessor |
QueryNodeProcessorPipeline.remove(int index) |
QueryNodeProcessor |
QueryNodeProcessorPipeline.set(int index,
QueryNodeProcessor processor) |
Modifier and Type | Method and Description |
---|---|
Iterator<QueryNodeProcessor> |
QueryNodeProcessorPipeline.iterator() |
ListIterator<QueryNodeProcessor> |
QueryNodeProcessorPipeline.listIterator() |
ListIterator<QueryNodeProcessor> |
QueryNodeProcessorPipeline.listIterator(int index) |
List<QueryNodeProcessor> |
QueryNodeProcessorPipeline.subList(int fromIndex,
int toIndex) |
Modifier and Type | Method and Description |
---|---|
void |
QueryNodeProcessorPipeline.add(int index,
QueryNodeProcessor processor) |
boolean |
QueryNodeProcessorPipeline.add(QueryNodeProcessor processor) |
void |
QueryNodeProcessorPipeline.addProcessor(QueryNodeProcessor processor)
Deprecated.
this class now conforms to
List interface, so use
QueryNodeProcessorPipeline.add(QueryNodeProcessor) instead |
QueryNodeProcessor |
QueryNodeProcessorPipeline.set(int index,
QueryNodeProcessor processor) |
Modifier and Type | Method and Description |
---|---|
boolean |
QueryNodeProcessorPipeline.addAll(Collection<? extends QueryNodeProcessor> c) |
boolean |
QueryNodeProcessorPipeline.addAll(int index,
Collection<? extends QueryNodeProcessor> c) |
Modifier and Type | Class and Description |
---|---|
class |
BooleanModifiersQueryNodeProcessor
This processor is used to apply the correct
ModifierQueryNode to BooleanQueryNode s children. |
class |
PrecedenceQueryNodeProcessorPipeline
This processor pipeline extends
StandardQueryNodeProcessorPipeline and enables
boolean precedence on it. |
Modifier and Type | Method and Description |
---|---|
QueryNodeProcessor |
QueryParserWrapper.getQueryProcessor()
Deprecated.
Returns
QueryNodeProcessor used to process the query node tree
generated by the
StandardSyntaxParser . |
Modifier and Type | Method and Description |
---|---|
void |
QueryParserWrapper.setQueryProcessor(QueryNodeProcessor processor)
Deprecated.
Sets the
QueryNodeProcessor used to process the query node tree
generated by the
StandardSyntaxParser . |
Modifier and Type | Class and Description |
---|---|
class |
AllowLeadingWildcardProcessor
This processor verifies if
StandardQueryConfigHandler.ConfigurationKeys.ALLOW_LEADING_WILDCARD is defined in the
QueryConfigHandler . |
class |
AnalyzerQueryNodeProcessor
This processor verifies if
StandardQueryConfigHandler.ConfigurationKeys.ANALYZER
is defined in the QueryConfigHandler . |
class |
BooleanSingleChildOptimizationQueryNodeProcessor
This processor removes every
BooleanQueryNode that contains only one
child and returns this child. |
class |
BoostQueryNodeProcessor
This processor iterates the query node tree looking for every
FieldableNode that has StandardQueryConfigHandler.ConfigurationKeys.BOOST in its
config. |
class |
DefaultPhraseSlopQueryNodeProcessor
This processor verifies if
StandardQueryConfigHandler.ConfigurationKeys.PHRASE_SLOP
is defined in the QueryConfigHandler . |
class |
FuzzyQueryNodeProcessor
This processor iterates the query node tree looking for every
FuzzyQueryNode , when this kind of node is found, it checks on the
query configuration for
StandardQueryConfigHandler.ConfigurationKeys.FUZZY_CONFIG , gets the
fuzzy prefix length and default similarity from it and set to the fuzzy node. |
class |
GroupQueryNodeProcessor
The
SyntaxParser
generates query node trees that consider the boolean operator precedence, but
Lucene current syntax does not support boolean precedence, so this processor
remove all the precedence and apply the equivalent modifier according to the
boolean operation defined on an specific query node. |
class |
LowercaseExpandedTermsQueryNodeProcessor
This processor verifies if
StandardQueryConfigHandler.ConfigurationKeys.LOWERCASE_EXPANDED_TERMS is defined in the
QueryConfigHandler . |
class |
MatchAllDocsQueryNodeProcessor
This processor converts every
WildcardQueryNode that is "*:*" to
MatchAllDocsQueryNode . |
class |
MultiFieldQueryNodeProcessor
This processor is used to expand terms so the query looks for the same term
in different fields.
|
class |
MultiTermRewriteMethodProcessor
This processor instates the default
MultiTermQuery.RewriteMethod ,
MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT , for multi-term
query nodes. |
class |
NumericQueryNodeProcessor
This processor is used to convert
FieldQueryNode s to
NumericRangeQueryNode s. |
class |
NumericRangeQueryNodeProcessor
This processor is used to convert
ParametricRangeQueryNode s to
NumericRangeQueryNode s. |
class |
ParametricRangeQueryNodeProcessor
This processor converts
ParametricRangeQueryNode objects to
RangeQueryNode objects. |
class |
PhraseSlopQueryNodeProcessor
This processor removes invalid
SlopQueryNode objects in the query
node tree. |
class |
RemoveEmptyNonLeafQueryNodeProcessor
This processor removes every
QueryNode that is not a leaf and has not
children. |
class |
StandardQueryNodeProcessorPipeline
This pipeline has all the processors needed to process a query node tree,
generated by
StandardSyntaxParser , already assembled. |
class |
WildcardQueryNodeProcessor
The
StandardSyntaxParser creates PrefixWildcardQueryNode nodes which
have values containing the prefixed wildcard. |