Class SpanNotQuery
Removes matches which overlap with another SpanQuery or
within a x tokens before or y tokens after another SpanQuery.
Assembly: Lucene.Net.dll
Syntax
public class SpanNotQuery : SpanQuery
Constructors
SpanNotQuery(SpanQuery, SpanQuery)
Construct a SpanNotQuery matching spans from include which
have no overlap with spans from exclude.
Declaration
public SpanNotQuery(SpanQuery include, SpanQuery exclude)
Parameters
SpanNotQuery(SpanQuery, SpanQuery, int)
Construct a SpanNotQuery matching spans from include which
have no overlap with spans from exclude within
dist tokens of include.
Declaration
public SpanNotQuery(SpanQuery include, SpanQuery exclude, int dist)
Parameters
SpanNotQuery(SpanQuery, SpanQuery, int, int)
Construct a SpanNotQuery matching spans from include which
have no overlap with spans from exclude within
pre tokens before or post tokens of include.
Declaration
public SpanNotQuery(SpanQuery include, SpanQuery exclude, int pre, int post)
Parameters
Properties
Exclude
Return the SpanQuery whose matches must not overlap those returned.
Declaration
public virtual SpanQuery Exclude { get; }
Property Value
Field
Returns the name of the field matched by this query.
Note that this may return
null if the query matches no terms.
Declaration
public override string Field { get; }
Property Value
Overrides
Include
Return the SpanQuery whose matches are filtered.
Declaration
public virtual SpanQuery Include { get; }
Property Value
Methods
Clone()
Returns a clone of this query.
Declaration
public override object Clone()
Returns
Overrides
Equals(object)
Returns true if o is equal to this.
Declaration
public override bool Equals(object o)
Parameters
| Type |
Name |
Description |
| object |
o |
|
Returns
Overrides
Expert: adds all terms occurring in this query to the terms set. Only
works if this query is in its rewritten (Rewrite(IndexReader)) form.
Declaration
public override void ExtractTerms(ISet<Term> terms)
Parameters
Overrides
Exceptions
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type |
Description |
| int |
A hash code for the current object.
|
Overrides
GetSpans(AtomicReaderContext, IBits, IDictionary<Term, TermContext>)
Expert: Returns the matches for this query in an index. Used internally
to search for spans.
Declaration
public override Spans GetSpans(AtomicReaderContext context, IBits acceptDocs, IDictionary<Term, TermContext> termContexts)
Parameters
Returns
Overrides
Rewrite(IndexReader)
Declaration
public override Query Rewrite(IndexReader reader)
Parameters
Returns
Overrides
ToString(string)
Prints a query to a string, with field assumed to be the
default field and omitted.
Declaration
public override string ToString(string field)
Parameters
| Type |
Name |
Description |
| string |
field |
|
Returns
Overrides