Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class PathQueryNode

    A PathQueryNode is used to store queries like /company/USA/California /product/shoes/brown. QueryText are objects that contain the text, begin position and end position in the query.

    Example how the text parser creates these objects:

    IList<PathQueryNode.QueryText> values = new List<PathQueryNode.QueryText>();
        values.Add(new PathQueryNode.QueryText("company", 1, 7));
        values.Add(new PathQueryNode.QueryText("USA", 9, 12));
        values.Add(new PathQueryNode.QueryText("California", 14, 23));
        QueryNode q = new PathQueryNode(values);
    Inheritance
    object
    QueryNode
    PathQueryNode
    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.TryGetTag(string, out object)
    QueryNode.Parent
    QueryNode.IsRoot
    QueryNode.m_toQueryStringIgnoreFields
    QueryNode.IsDefaultField(string)
    QueryNode.TagMap
    QueryNode.RemoveChildren(IQueryNode)
    QueryNode.RemoveFromParent()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.QueryParsers.Flexible.Core.Nodes
    Assembly: Lucene.Net.QueryParser.dll
    Syntax
    public class PathQueryNode : QueryNode, IQueryNode

    Constructors

    PathQueryNode(IList<QueryText>)

    A PathQueryNode is used to store queries like /company/USA/California /product/shoes/brown. QueryText are objects that contain the text, begin position and end position in the query.

    Example how the text parser creates these objects:

    IList<PathQueryNode.QueryText> values = new List<PathQueryNode.QueryText>();
        values.Add(new PathQueryNode.QueryText("company", 1, 7));
        values.Add(new PathQueryNode.QueryText("USA", 9, 12));
        values.Add(new PathQueryNode.QueryText("California", 14, 23));
        QueryNode q = new PathQueryNode(values);
    Declaration
    public PathQueryNode(IList<PathQueryNode.QueryText> pathElements)
    Parameters
    Type Name Description
    IList<PathQueryNode.QueryText> pathElements

    List of QueryText objects

    Properties

    PathElements

    Gets or Sets the a List with all QueryText elements

    Declaration
    public virtual IList<PathQueryNode.QueryText> PathElements { get; set; }
    Property Value
    Type Description
    IList<PathQueryNode.QueryText>

    QueryText List size

    Methods

    CloneTree()

    Recursive clone the IQueryNode tree. The tags are not copied to the new tree when you call the CloneTree() method.

    Declaration
    public override IQueryNode CloneTree()
    Returns
    Type Description
    IQueryNode

    the cloned tree

    Overrides
    QueryNode.CloneTree()

    GetFirstPathElement()

    Returns the string value of a specific QueryText element

    Declaration
    public virtual string GetFirstPathElement()
    Returns
    Type Description
    string

    The string for a specific QueryText element

    GetPathElement(int)

    Returns the a specific QueryText element

    Declaration
    public virtual PathQueryNode.QueryText GetPathElement(int index)
    Parameters
    Type Name Description
    int index
    Returns
    Type Description
    PathQueryNode.QueryText

    QueryText List size

    GetPathElements(int)

    Returns a List QueryText element from position startIndex

    Declaration
    public virtual IList<PathQueryNode.QueryText> GetPathElements(int startIndex)
    Parameters
    Type Name Description
    int startIndex
    Returns
    Type Description
    IList<PathQueryNode.QueryText>

    a List QueryText element from position startIndex

    ToQueryString(IEscapeQuerySyntax)

    convert to a query string understood by the query parser

    Declaration
    public override string ToQueryString(IEscapeQuerySyntax escaper)
    Parameters
    Type Name Description
    IEscapeQuerySyntax escaper
    Returns
    Type Description
    string
    Overrides
    QueryNode.ToQueryString(IEscapeQuerySyntax)

    ToString()

    Every implementation of this class should return pseudo xml like this:

    For FieldQueryNode: <field start='1' end='2' field='subject' text='foo'/>

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    QueryNode.ToString()
    See Also
    ToString()

    Implements

    IQueryNode
    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.