Class SpanNearQuery
Matches spans which are near one another. One can specify slop, the
maximum number of intervening unmatched positions, as well as whether
matches are required to be in-order.
Inheritance
System.Object
SpanNearQuery
Assembly: Lucene.Net.dll
Syntax
public class SpanNearQuery : SpanQuery
Constructors
|
Improve this Doc
View Source
SpanNearQuery(SpanQuery[], Int32, Boolean)
Construct a SpanNearQuery. Matches spans matching a span from each
clause, with up to slop
total unmatched positions between
them. * When inOrder
is true
, the spans from each clause
must be * ordered as in clauses
.
Declaration
public SpanNearQuery(SpanQuery[] clauses, int slop, bool inOrder)
Parameters
Type |
Name |
Description |
SpanQuery[] |
clauses |
The clauses to find near each other
|
System.Int32 |
slop |
The slop value
|
System.Boolean |
inOrder |
true if order is important
|
|
Improve this Doc
View Source
SpanNearQuery(SpanQuery[], Int32, Boolean, Boolean)
Declaration
public SpanNearQuery(SpanQuery[] clauses, int slop, bool inOrder, bool collectPayloads)
Parameters
Type |
Name |
Description |
SpanQuery[] |
clauses |
|
System.Int32 |
slop |
|
System.Boolean |
inOrder |
|
System.Boolean |
collectPayloads |
|
Fields
|
Improve this Doc
View Source
m_clauses
Declaration
protected readonly IList<SpanQuery> m_clauses
Field Value
|
Improve this Doc
View Source
m_field
Declaration
Field Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
m_inOrder
Declaration
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
m_slop
Declaration
Field Value
Type |
Description |
System.Int32 |
|
Properties
|
Improve this Doc
View Source
Field
Declaration
public override string Field { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
|
Improve this Doc
View Source
IsInOrder
Return true
if matches are required to be in-order.
Declaration
public virtual bool IsInOrder { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Slop
Return the maximum number of intervening unmatched positions permitted.
Declaration
public virtual int Slop { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
|
Improve this Doc
View Source
Clone()
Declaration
public override object Clone()
Returns
Type |
Description |
System.Object |
|
Overrides
|
Improve this Doc
View Source
Equals(Object)
Returns true iff
o
is equal to this.
Declaration
public override bool Equals(object o)
Parameters
Type |
Name |
Description |
System.Object |
o |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
|
Improve this Doc
View Source
Declaration
public override void ExtractTerms(ISet<Term> terms)
Parameters
Type |
Name |
Description |
ISet<Term> |
terms |
|
Overrides
|
Improve this Doc
View Source
GetClauses()
Return the clauses whose spans are matched.
Declaration
public virtual SpanQuery[] GetClauses()
Returns
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
|
Improve this Doc
View Source
GetSpans(AtomicReaderContext, IBits, IDictionary<Term, TermContext>)
Declaration
public override Spans GetSpans(AtomicReaderContext context, IBits acceptDocs, IDictionary<Term, TermContext> termContexts)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
Rewrite(IndexReader)
Declaration
public override Query Rewrite(IndexReader reader)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
ToString(String)
Declaration
public override string ToString(string field)
Parameters
Type |
Name |
Description |
System.String |
field |
|
Returns
Type |
Description |
System.String |
|
Overrides