Show / Hide Table of Contents

    Class ProximityQueryNode

    A ProximityQueryNode represents a query where the terms should meet specific distance conditions. (a b c) WITHIN [SENTENCE|PARAGRAPH|NUMBER] [INORDER] ("a" "b" "c") WITHIN [SENTENCE|PARAGRAPH|NUMBER] [INORDER]

    TODO: Add this to the future standard Lucene parser/processor/builder

    Inheritance
    System.Object
    QueryNode
    BooleanQueryNode
    ProximityQueryNode
    Implements
    IQueryNode
    Inherited Members
    QueryNode.PLAINTEXT_FIELD_NAME
    QueryNode.Allocate()
    QueryNode.Add(IQueryNode)
    QueryNode.Add(IList<IQueryNode>)
    QueryNode.IsLeaf
    QueryNode.Set(IList<IQueryNode>)
    QueryNode.Clone()
    QueryNode.GetChildren()
    QueryNode.SetTag(String, Object)
    QueryNode.UnsetTag(String)
    QueryNode.ContainsTag(String)
    QueryNode.GetTag(String)
    QueryNode.Parent
    QueryNode.IsRoot
    QueryNode.m_toQueryStringIgnoreFields
    QueryNode.IsDefaultField(String)
    QueryNode.TagMap
    QueryNode.RemoveFromParent()
    Namespace: Lucene.Net.QueryParsers.Flexible.Core.Nodes
    Assembly: Lucene.Net.QueryParser.dll
    Syntax
    public class ProximityQueryNode : BooleanQueryNode, IQueryNode

    Constructors

    | Improve this Doc View Source

    ProximityQueryNode(IList<IQueryNode>, String, ProximityQueryNode.Type, Boolean)

    Declaration
    public ProximityQueryNode(IList<IQueryNode> clauses, string field, ProximityQueryNode.Type type, bool inorder)
    Parameters
    Type Name Description
    IList<IQueryNode> clauses

    QueryNode children

    System.String field

    field name

    ProximityQueryNode.Type type

    type of proximity query

    System.Boolean inorder

    true, if the tokens should be matched in the order of the clauses

    | Improve this Doc View Source

    ProximityQueryNode(IList<IQueryNode>, String, ProximityQueryNode.Type, Int32, Boolean)

    Declaration
    public ProximityQueryNode(IList<IQueryNode> clauses, string field, ProximityQueryNode.Type type, int distance, bool inorder)
    Parameters
    Type Name Description
    IList<IQueryNode> clauses

    QueryNode children

    System.String field

    field name

    ProximityQueryNode.Type type

    type of proximity query

    System.Int32 distance

    positive integer that specifies the distance

    System.Boolean inorder

    true, if the tokens should be matched in the order of the clauses

    Properties

    | Improve this Doc View Source

    Distance

    Gets the distance

    Declaration
    public virtual int Distance { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Field

    Gets or Sets the field. Returns null if the field was not specified in the query string.

    Declaration
    public virtual string Field { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    IsInOrder

    terms must be matched in the specified order

    Declaration
    public virtual bool IsInOrder { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    ProximityType

    Declaration
    public virtual ProximityQueryNode.Type ProximityType { get; }
    Property Value
    Type Description
    ProximityQueryNode.Type

    Methods

    | Improve this Doc View Source

    CloneTree()

    Declaration
    public override IQueryNode CloneTree()
    Returns
    Type Description
    IQueryNode
    Overrides
    BooleanQueryNode.CloneTree()
    | Improve this Doc View Source

    GetFieldAsString()

    Gets the field as a string. Returns null if the field was not specified in the query string.

    Declaration
    public virtual string GetFieldAsString()
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    ToQueryString(IEscapeQuerySyntax)

    Declaration
    public override string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser)
    Parameters
    Type Name Description
    IEscapeQuerySyntax escapeSyntaxParser
    Returns
    Type Description
    System.String
    Overrides
    BooleanQueryNode.ToQueryString(IEscapeQuerySyntax)
    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    BooleanQueryNode.ToString()

    Implements

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