Class RemoveEmptyNonLeafQueryNodeProcessor
java.lang.Object
org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorImpl
org.apache.lucene.queryparser.flexible.standard.processors.RemoveEmptyNonLeafQueryNodeProcessor
- All Implemented Interfaces:
QueryNodeProcessor
This processor removes every
This processor is used at the end of a pipeline to avoid invalid query node tree structures like a
QueryNode that is not a leaf and has not
children. If after processing the entire tree the root node is not a leaf and
has no children, a MatchNoDocsQueryNode object is returned. This processor is used at the end of a pipeline to avoid invalid query node tree structures like a
GroupQueryNode or ModifierQueryNode
with no children. - See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, setQueryConfigHandler
-
Constructor Details
-
RemoveEmptyNonLeafQueryNodeProcessor
public RemoveEmptyNonLeafQueryNodeProcessor()
-
-
Method Details
-
process
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
-