Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class DefaultPhraseSlopQueryNodeProcessor

    This processor verifies if PHRASE_SLOP is defined in the QueryConfigHandler. If it is, it looks for every TokenizedPhraseQueryNode and MultiPhraseQueryNode that does not have any SlopQueryNode applied to it and creates an SlopQueryNode and apply to it. The new SlopQueryNode has the same slop value defined in the configuration.

    Inheritance
    object
    QueryNodeProcessor
    DefaultPhraseSlopQueryNodeProcessor
    Implements
    IQueryNodeProcessor
    Inherited Members
    QueryNodeProcessor.SetQueryConfigHandler(QueryConfigHandler)
    QueryNodeProcessor.GetQueryConfigHandler()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.QueryParsers.Flexible.Standard.Processors
    Assembly: Lucene.Net.QueryParser.dll
    Syntax
    public class DefaultPhraseSlopQueryNodeProcessor : QueryNodeProcessor, IQueryNodeProcessor

    Constructors

    DefaultPhraseSlopQueryNodeProcessor()

    This processor verifies if PHRASE_SLOP is defined in the QueryConfigHandler. If it is, it looks for every TokenizedPhraseQueryNode and MultiPhraseQueryNode that does not have any SlopQueryNode applied to it and creates an SlopQueryNode and apply to it. The new SlopQueryNode has the same slop value defined in the configuration.

    Declaration
    public DefaultPhraseSlopQueryNodeProcessor()
    See Also
    SlopQueryNode
    PHRASE_SLOP

    Methods

    PostProcessNode(IQueryNode)

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

    Declaration
    protected override 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

    Overrides
    QueryNodeProcessor.PostProcessNode(IQueryNode)
    Exceptions
    Type Condition
    QueryNodeException

    if something goes wrong during the query node processing

    See Also
    SlopQueryNode
    PHRASE_SLOP

    PreProcessNode(IQueryNode)

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

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

    the query node to be pre-processed

    Returns
    Type Description
    IQueryNode

    a query node

    Overrides
    QueryNodeProcessor.PreProcessNode(IQueryNode)
    Exceptions
    Type Condition
    QueryNodeException

    if something goes wrong during the query node processing

    See Also
    SlopQueryNode
    PHRASE_SLOP

    Process(IQueryNode)

    Processes a query node tree. It may return the same or another query tree. I should never return null.

    Declaration
    public override IQueryNode Process(IQueryNode queryTree)
    Parameters
    Type Name Description
    IQueryNode queryTree

    tree root node

    Returns
    Type Description
    IQueryNode

    the processed query tree

    Overrides
    QueryNodeProcessor.Process(IQueryNode)
    See Also
    SlopQueryNode
    PHRASE_SLOP

    ProcessChildren(IQueryNode)

    This method is called every time a child is processed.

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

    the query node child to be processed

    Overrides
    QueryNodeProcessor.ProcessChildren(IQueryNode)
    Exceptions
    Type Condition
    QueryNodeException

    if something goes wrong during the query node processing

    See Also
    SlopQueryNode
    PHRASE_SLOP

    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 override 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

    Overrides
    QueryNodeProcessor.SetChildrenOrder(IList<IQueryNode>)
    Exceptions
    Type Condition
    QueryNodeException

    if something goes wrong during the query node processing

    See Also
    SlopQueryNode
    PHRASE_SLOP

    Implements

    IQueryNodeProcessor

    See Also

    SlopQueryNode
    PHRASE_SLOP
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.