Fork me on GitHub
  • API

    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
    object
    BooleanQuery2ModifierNodeProcessor
    Implements
    IQueryNodeProcessor
    Inherited Members
    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 BooleanQuery2ModifierNodeProcessor : IQueryNodeProcessor

    Constructors

    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).
    Declaration
    public BooleanQuery2ModifierNodeProcessor()
    See Also
    DEFAULT_OPERATOR
    BooleanModifiersQueryNodeProcessor

    Methods

    FillChildrenBufferAndApplyModifiery(IQueryNode)

    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).
    Declaration
    protected virtual void FillChildrenBufferAndApplyModifiery(IQueryNode parent)
    Parameters
    Type Name Description
    IQueryNode parent
    See Also
    DEFAULT_OPERATOR
    BooleanModifiersQueryNodeProcessor

    GetQueryConfigHandler()

    Returns the QueryConfigHandler associated to the query tree if any, otherwise it returns null

    Declaration
    public virtual QueryConfigHandler GetQueryConfigHandler()
    Returns
    Type Description
    QueryConfigHandler

    the QueryConfigHandler associated to the query tree if any, otherwise it returns null

    See Also
    DEFAULT_OPERATOR
    BooleanModifiersQueryNodeProcessor

    IsDefaultBooleanQueryNode(IQueryNode)

    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).
    Declaration
    protected virtual bool IsDefaultBooleanQueryNode(IQueryNode toTest)
    Parameters
    Type Name Description
    IQueryNode toTest
    Returns
    Type Description
    bool
    See Also
    DEFAULT_OPERATOR
    BooleanModifiersQueryNodeProcessor

    PostProcessNode(IQueryNode)

    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).
    Declaration
    protected virtual IQueryNode PostProcessNode(IQueryNode node)
    Parameters
    Type Name Description
    IQueryNode node
    Returns
    Type Description
    IQueryNode
    See Also
    DEFAULT_OPERATOR
    BooleanModifiersQueryNodeProcessor

    PreProcessNode(IQueryNode)

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

    Process(IQueryNode)

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

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

    tree root node

    Returns
    Type Description
    IQueryNode

    the processed query tree

    See Also
    DEFAULT_OPERATOR
    BooleanModifiersQueryNodeProcessor

    ProcessChildren(IQueryNode)

    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).
    Declaration
    protected virtual void ProcessChildren(IQueryNode queryTree)
    Parameters
    Type Name Description
    IQueryNode queryTree
    See Also
    DEFAULT_OPERATOR
    BooleanModifiersQueryNodeProcessor

    SetQueryConfigHandler(QueryConfigHandler)

    Sets the QueryConfigHandler associated to the query tree.

    Declaration
    public virtual void SetQueryConfigHandler(QueryConfigHandler queryConfigHandler)
    Parameters
    Type Name Description
    QueryConfigHandler queryConfigHandler
    See Also
    DEFAULT_OPERATOR
    BooleanModifiersQueryNodeProcessor

    TagModifierButDoNotOverride(IQueryNode, Modifier)

    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).
    Declaration
    protected virtual void TagModifierButDoNotOverride(IQueryNode node, Modifier mod)
    Parameters
    Type Name Description
    IQueryNode node
    Modifier mod
    See Also
    DEFAULT_OPERATOR
    BooleanModifiersQueryNodeProcessor

    Implements

    IQueryNodeProcessor

    See Also

    DEFAULT_OPERATOR
    BooleanModifiersQueryNodeProcessor
    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.