Class SlopQueryNode
A SlopQueryNode represents phrase query with a slop.
From Lucene FAQ: Is there a way to use a proximity operator (like near or within) with Lucene? There is a variable called slop that allows you to perform NEAR/WITHIN-like queries. By default, slop is set to 0 so that only exact phrases will match. When using TextParser you can use this syntax to specify the slop: "doug cutting"~2 will find documents that contain "doug cutting" as well as ones that contain "cutting doug".
Inherited Members
Namespace: Lucene.Net.QueryParsers.Flexible.Core.Nodes
Assembly: Lucene.Net.QueryParser.dll
Syntax
public class SlopQueryNode : QueryNode, IFieldableNode, IQueryNode
  Constructors
SlopQueryNode(IQueryNode, int)
A SlopQueryNode represents phrase query with a slop.
From Lucene FAQ: Is there a way to use a proximity operator (like near or within) with Lucene? There is a variable called slop that allows you to perform NEAR/WITHIN-like queries. By default, slop is set to 0 so that only exact phrases will match. When using TextParser you can use this syntax to specify the slop: "doug cutting"~2 will find documents that contain "doug cutting" as well as ones that contain "cutting doug".
Declaration
public SlopQueryNode(IQueryNode query, int value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IQueryNode | query | QueryNode Tree with the phrase  | 
      
| int | value | slop value  | 
      
Properties
Field
Gets or Sets the field name associated to the node and every node under it.
Declaration
public virtual string Field { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | 
Value
A SlopQueryNode represents phrase query with a slop.
From Lucene FAQ: Is there a way to use a proximity operator (like near or within) with Lucene? There is a variable called slop that allows you to perform NEAR/WITHIN-like queries. By default, slop is set to 0 so that only exact phrases will match. When using TextParser you can use this syntax to specify the slop: "doug cutting"~2 will find documents that contain "doug cutting" as well as ones that contain "cutting doug".
Declaration
public virtual int Value { get; }
  Property Value
| Type | Description | 
|---|---|
| int | 
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
GetChild()
A SlopQueryNode represents phrase query with a slop.
From Lucene FAQ: Is there a way to use a proximity operator (like near or within) with Lucene? There is a variable called slop that allows you to perform NEAR/WITHIN-like queries. By default, slop is set to 0 so that only exact phrases will match. When using TextParser you can use this syntax to specify the slop: "doug cutting"~2 will find documents that contain "doug cutting" as well as ones that contain "cutting doug".
Declaration
public virtual IQueryNode GetChild()
  Returns
| Type | Description | 
|---|---|
| IQueryNode | 
ToQueryString(IEscapeQuerySyntax)
convert to a query string understood by the query parser
Declaration
public override string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IEscapeQuerySyntax | escapeSyntaxParser | 
Returns
| Type | Description | 
|---|---|
| string | 
Overrides
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 |