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);
Implements
Inherited Members
Namespace: Lucene.Net.QueryParsers.Flexible.Core.Nodes
Assembly: Lucene.Net.QueryParser.dll
Syntax
public class PathQueryNode : QueryNode, IQueryNode
Constructors
| Improve this Doc View SourcePathQueryNode(IList<PathQueryNode.QueryText>)
Declaration
public PathQueryNode(IList<PathQueryNode.QueryText> pathElements)
Parameters
Type | Name | Description |
---|---|---|
IList<PathQueryNode.QueryText> | pathElements | List of QueryText objects |
Properties
| Improve this Doc View SourcePathElements
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
| Improve this Doc View SourceCloneTree()
Declaration
public override IQueryNode CloneTree()
Returns
Type | Description |
---|---|
IQueryNode |
Overrides
| Improve this Doc View SourceGetFirstPathElement()
Returns the
Declaration
public virtual string GetFirstPathElement()
Returns
Type | Description |
---|---|
System.String | The |
GetPathElement(Int32)
Returns the a specific QueryText element
Declaration
public virtual PathQueryNode.QueryText GetPathElement(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Returns
Type | Description |
---|---|
PathQueryNode.QueryText | QueryText List size |
GetPathElements(Int32)
Returns a List QueryText element from position startIndex
Declaration
public virtual IList<PathQueryNode.QueryText> GetPathElements(int startIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | startIndex |
Returns
Type | Description |
---|---|
IList<PathQueryNode.QueryText> | a List QueryText element from position |
ToQueryString(IEscapeQuerySyntax)
Declaration
public override string ToQueryString(IEscapeQuerySyntax escaper)
Parameters
Type | Name | Description |
---|---|---|
IEscapeQuerySyntax | escaper |
Returns
Type | Description |
---|---|
System.String |
Overrides
| Improve this Doc View SourceToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |