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
Implements
Inherited Members
Namespace: Lucene.Net.QueryParsers.Flexible.Core.Nodes
Assembly: Lucene.Net.QueryParser.dll
Syntax
public class ProximityQueryNode : BooleanQueryNode, IQueryNode
Constructors
| Improve this Doc View SourceProximityQueryNode(IList<IQueryNode>, String, ProximityQueryNode.Type, Boolean)
Declaration
public ProximityQueryNode(IList<IQueryNode> clauses, string field, ProximityQueryNode.Type type, bool inorder)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.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 |
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 |
---|---|---|
System.Collections.Generic.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 SourceDistance
Gets the distance
Declaration
public virtual int Distance { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
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 |
IsInOrder
terms must be matched in the specified order
Declaration
public virtual bool IsInOrder { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ProximityType
Declaration
public virtual ProximityQueryNode.Type ProximityType { get; }
Property Value
Type | Description |
---|---|
ProximityQueryNode.Type |
Methods
| Improve this Doc View SourceCloneTree()
Declaration
public override IQueryNode CloneTree()
Returns
Type | Description |
---|---|
IQueryNode |
Overrides
| Improve this Doc View SourceGetFieldAsString()
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 |
ToQueryString(IEscapeQuerySyntax)
Declaration
public override string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser)
Parameters
Type | Name | Description |
---|---|---|
IEscapeQuerySyntax | escapeSyntaxParser |
Returns
Type | Description |
---|---|
System.String |
Overrides
| Improve this Doc View SourceToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |