Class BooleanModifiersQueryNodeProcessor
- java.lang.Object
-
- org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorImpl
-
- org.apache.lucene.queryparser.flexible.precedence.processors.BooleanModifiersQueryNodeProcessor
-
- All Implemented Interfaces:
QueryNodeProcessor
public class BooleanModifiersQueryNodeProcessor extends QueryNodeProcessorImpl
This processor is used to apply the correct
ModifierQueryNodetoBooleanQueryNodes children.It walks through the query node tree looking for
BooleanQueryNodes. If anAndQueryNodeis found, every child, which is not aModifierQueryNodeor theModifierQueryNodeisModifierQueryNode.Modifier.MOD_NONE, becomes aModifierQueryNode.Modifier.MOD_REQ. For any otherBooleanQueryNodewhich is not anOrQueryNode, it checks the default operator isStandardQueryConfigHandler.Operator.AND, if it is, the same operation when anAndQueryNodeis found is applied to it.
-
-
Constructor Summary
Constructors Constructor Description BooleanModifiersQueryNodeProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryNodeprocess(QueryNode queryTree)Processes a query node tree.-
Methods inherited from class org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, setQueryConfigHandler
-
-
-
-
Method Detail
-
process
public QueryNode process(QueryNode queryTree) throws QueryNodeException
Description copied from interface:QueryNodeProcessorProcesses a query node tree. It may return the same or another query tree. I should never returnnull.- Specified by:
processin interfaceQueryNodeProcessor- Overrides:
processin classQueryNodeProcessorImpl- Parameters:
queryTree- tree root node- Returns:
- the processed query tree
- Throws:
QueryNodeException
-
-