Show / Hide Table of Contents

    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
    System.Object
    QueryNodeProcessor
    NoChildOptimizationQueryNodeProcessor
    RemoveDeletedQueryNodesProcessor
    BooleanModifiersQueryNodeProcessor
    AllowLeadingWildcardProcessor
    AnalyzerQueryNodeProcessor
    BooleanSingleChildOptimizationQueryNodeProcessor
    BoostQueryNodeProcessor
    DefaultPhraseSlopQueryNodeProcessor
    FuzzyQueryNodeProcessor
    LowercaseExpandedTermsQueryNodeProcessor
    MatchAllDocsQueryNodeProcessor
    MultiFieldQueryNodeProcessor
    MultiTermRewriteMethodProcessor
    NumericQueryNodeProcessor
    NumericRangeQueryNodeProcessor
    OpenRangeQueryNodeProcessor
    PhraseSlopQueryNodeProcessor
    RemoveEmptyNonLeafQueryNodeProcessor
    TermRangeQueryNodeProcessor
    WildcardQueryNodeProcessor
    Implements
    IQueryNodeProcessor
    Namespace: Lucene.Net.QueryParsers.Flexible.Core.Processors
    Assembly: Lucene.Net.QueryParser.dll
    Syntax
    public abstract class QueryNodeProcessor : object, IQueryNodeProcessor

    Constructors

    | Improve this Doc View Source

    QueryNodeProcessor()

    Declaration
    public QueryNodeProcessor()
    | Improve this Doc View Source

    QueryNodeProcessor(QueryConfigHandler)

    Declaration
    public QueryNodeProcessor(QueryConfigHandler queryConfigHandler)
    Parameters
    Type Name Description
    QueryConfigHandler queryConfigHandler

    Methods

    | Improve this Doc View Source

    GetQueryConfigHandler()

    For reference about this method check: GetQueryConfigHandler().

    Declaration
    public virtual QueryConfigHandler GetQueryConfigHandler()
    Returns
    Type Description
    QueryConfigHandler

    QueryConfigHandler the query configuration handler to be set.

    See Also
    SetQueryConfigHandler(QueryConfigHandler)
    QueryConfigHandler
    | Improve this Doc View Source

    PostProcessNode(IQueryNode)

    This method is invoked for every node when walking up the tree.

    Declaration
    protected abstract IQueryNode PostProcessNode(IQueryNode node)
    Parameters
    Type Name Description
    IQueryNode node

    node the query node to be post-processed

    Returns
    Type Description
    IQueryNode

    a query node

    Exceptions
    Type Condition
    QueryNodeException

    if something goes wrong during the query node processing

    | Improve this Doc View Source

    PreProcessNode(IQueryNode)

    This method is invoked for every node when walking down the tree.

    Declaration
    protected abstract IQueryNode PreProcessNode(IQueryNode node)
    Parameters
    Type Name Description
    IQueryNode node

    the query node to be pre-processed

    Returns
    Type Description
    IQueryNode

    a query node

    Exceptions
    Type Condition
    QueryNodeException

    if something goes wrong during the query node processing

    | Improve this Doc View Source

    Process(IQueryNode)

    Declaration
    public virtual IQueryNode Process(IQueryNode queryTree)
    Parameters
    Type Name Description
    IQueryNode queryTree
    Returns
    Type Description
    IQueryNode
    | Improve this Doc View Source

    ProcessChildren(IQueryNode)

    This method is called every time a child is processed.

    Declaration
    protected virtual void ProcessChildren(IQueryNode queryTree)
    Parameters
    Type Name Description
    IQueryNode queryTree

    the query node child to be processed

    Exceptions
    Type Condition
    QueryNodeException

    if something goes wrong during the query node processing

    | Improve this Doc View Source

    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.

    Declaration
    protected abstract IList<IQueryNode> SetChildrenOrder(IList<IQueryNode> children)
    Parameters
    Type Name Description
    IList<IQueryNode> children

    the list containing all current node's children

    Returns
    Type Description
    IList<IQueryNode>

    a new list containing all children that should be set to the current node

    Exceptions
    Type Condition
    QueryNodeException

    if something goes wrong during the query node processing

    | Improve this Doc View Source

    SetQueryConfigHandler(QueryConfigHandler)

    For reference about this method check: SetQueryConfigHandler(QueryConfigHandler).

    Declaration
    public virtual void SetQueryConfigHandler(QueryConfigHandler queryConfigHandler)
    Parameters
    Type Name Description
    QueryConfigHandler queryConfigHandler

    the query configuration handler to be set.

    See Also
    SetQueryConfigHandler(QueryConfigHandler)
    QueryConfigHandler

    Implements

    IQueryNodeProcessor

    See Also

    IQueryNodeProcessor
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)