Show / Hide Table of Contents

    Class BooleanQuery2ModifierNodeProcessor

    This processor is used to apply the correct ModifierQueryNode to BooleanQueryNodes children. This is a variant of BooleanModifiersQueryNodeProcessor which ignores precedence.

    The StandardSyntaxParser knows the rules of precedence, but lucene does not. e.g.

    (A AND B OR C AND D)
    ist treated like

    (+A +B +C +D)
    .

    This processor walks through the query node tree looking for BooleanQueryNodes. If an AndQueryNode is found, every child, which is not a ModifierQueryNode or the ModifierQueryNode is MOD_NONE, becomes a MOD_REQ. For default BooleanQueryNode, it checks the default operator is AND, if it is, the same operation when an AndQueryNode is found is applied to it. Each BooleanQueryNode which direct parent is also a BooleanQueryNode is removed (to ignore the rules of precedence).

    Inheritance
    System.Object
    BooleanQuery2ModifierNodeProcessor
    Implements
    IQueryNodeProcessor
    Namespace: Lucene.Net.QueryParsers.Flexible.Standard.Processors
    Assembly: Lucene.Net.QueryParser.dll
    Syntax
    public class BooleanQuery2ModifierNodeProcessor : object, IQueryNodeProcessor

    Constructors

    | Improve this Doc View Source

    BooleanQuery2ModifierNodeProcessor()

    Declaration
    public BooleanQuery2ModifierNodeProcessor()

    Methods

    | Improve this Doc View Source

    FillChildrenBufferAndApplyModifiery(IQueryNode)

    Declaration
    protected virtual void FillChildrenBufferAndApplyModifiery(IQueryNode parent)
    Parameters
    Type Name Description
    IQueryNode parent
    | Improve this Doc View Source

    GetQueryConfigHandler()

    Declaration
    public virtual QueryConfigHandler GetQueryConfigHandler()
    Returns
    Type Description
    QueryConfigHandler
    | Improve this Doc View Source

    IsDefaultBooleanQueryNode(IQueryNode)

    Declaration
    protected virtual bool IsDefaultBooleanQueryNode(IQueryNode toTest)
    Parameters
    Type Name Description
    IQueryNode toTest
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    PostProcessNode(IQueryNode)

    Declaration
    protected virtual IQueryNode PostProcessNode(IQueryNode node)
    Parameters
    Type Name Description
    IQueryNode node
    Returns
    Type Description
    IQueryNode
    | Improve this Doc View Source

    PreProcessNode(IQueryNode)

    Declaration
    protected virtual IQueryNode PreProcessNode(IQueryNode node)
    Parameters
    Type Name Description
    IQueryNode node
    Returns
    Type Description
    IQueryNode
    | 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)

    Declaration
    protected virtual void ProcessChildren(IQueryNode queryTree)
    Parameters
    Type Name Description
    IQueryNode queryTree
    | Improve this Doc View Source

    SetQueryConfigHandler(QueryConfigHandler)

    Declaration
    public virtual void SetQueryConfigHandler(QueryConfigHandler queryConfigHandler)
    Parameters
    Type Name Description
    QueryConfigHandler queryConfigHandler
    | Improve this Doc View Source

    TagModifierButDoNotOverride(IQueryNode, Modifier)

    Declaration
    protected virtual void TagModifierButDoNotOverride(IQueryNode node, Modifier mod)
    Parameters
    Type Name Description
    IQueryNode node
    Modifier mod

    Implements

    IQueryNodeProcessor

    See Also

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