Class QueryNodeProcessor
This is a default implementation for the IQueryNodeProcessor interface, it's an abstract class, so it should be extended by classes that want to process a IQueryNode tree.
This class process IQueryNodes from left to right in the tree. While it's walking down the tree, for every node, PreProcessNode(IQueryNode) is invoked. After a node's children are processed, PostProcessNode(IQueryNode) is invoked for that node. SetChildrenOrder(IList<IQueryNode>) is invoked before PostProcessNode(IQueryNode) only if the node has at least one child, in SetChildrenOrder(IList<IQueryNode>) the implementor might redefine the children order or remove any children from the children list.
Here is an example about how it process the nodes:
a / \ b e / \ c d
Here is the order the methods would be invoked for the tree described above:
PreProcessNode( a );
PreProcessNode( b );
PreProcessNode( c );
PostProcessNode( c );
PreProcessNode( d );
PostProcessNode( d );
SetChildrenOrder( bChildrenList );
PostProcessNode( b );
PreProcessNode( e );
PostProcessNode( e );
SetChildrenOrder( aChildrenList );
PostProcessNode( a )
Inheritance
Inherited Members
Assembly: Lucene.Net.QueryParser.dll
Syntax
[Serializable]
public abstract class QueryNodeProcessor : IQueryNodeProcessor
Constructors
Name | Description |
---|---|
QueryNodeProcessor() | |
QueryNodeProcessor(QueryConfigHandler) |
Methods
Name | Description |
---|---|
GetQueryConfigHandler() | For reference about this method check: GetQueryConfigHandler(). |
PostProcessNode(IQueryNode) | This method is invoked for every node when walking up the tree. |
PreProcessNode(IQueryNode) | This method is invoked for every node when walking down the tree. |
Process(IQueryNode) | |
ProcessChildren(IQueryNode) | This method is called every time a child is processed. |
SetChildrenOrder(IList<IQueryNode>) | This method is invoked for every node that has at least on child. It's invoked right before PostProcessNode(IQueryNode) is invoked. |
SetQueryConfigHandler(QueryConfigHandler) | For reference about this method check: SetQueryConfigHandler(QueryConfigHandler). |