Lucene.Net
3.0.3
Lucene.Net is a port of the Lucene search engine library, written in C# and targeted at .NET runtime users.
|
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. More...
Inherits Lucene.Net.Search.Spans.SpanQuery, and ICloneable.
Public Member Functions | |
SpanNearQuery (SpanQuery[] clauses, int slop, bool inOrder) | |
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 . | |
SpanNearQuery (SpanQuery[] clauses, int slop, bool inOrder, bool collectPayloads) | |
virtual SpanQuery[] | GetClauses () |
Return the clauses whose spans are matched. | |
override void | ExtractTerms (System.Collections.Generic.ISet< Term > terms) |
Expert: adds all terms occuring in this query to the terms set. Only works if this query is in its rewritten form. | |
override System.String | ToString (System.String field) |
Prints a query to a string, with field assumed to be the default field and omitted. The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:
| |
override Spans | GetSpans (IndexReader reader) |
Expert: Returns the matches for this query in an index. Used internally to search for spans. | |
override Query | Rewrite (IndexReader reader) |
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys. | |
override System.Object | Clone () |
Returns a clone of this query. | |
override bool | Equals (System.Object o) |
Returns true iff o is equal to this. | |
override int | GetHashCode () |
Public Member Functions inherited from Lucene.Net.Search.Spans.SpanQuery | |
override Weight | CreateWeight (Searcher searcher) |
Expert: Constructs an appropriate Weight implementation for this query. | |
Public Member Functions inherited from Lucene.Net.Search.Query | |
override System.String | ToString () |
Prints a query to a string. | |
virtual Weight | Weight (Searcher searcher) |
Expert: Constructs and initializes a Weight for a top-level query. | |
virtual Query | Combine (Query[] queries) |
Expert: called when re-writing queries under MultiSearcher. | |
virtual Similarity | GetSimilarity (Searcher searcher) |
Expert: Returns the Similarity implementation to be used for this query. Subclasses may override this method to specify their own Similarity implementation, perhaps one that delegates through that of the Searcher. By default the Searcher's Similarity implementation is returned. | |
override int | GetHashCode () |
override bool | Equals (System.Object obj) |
Properties | |
virtual int | Slop [get] |
Return the maximum number of intervening unmatched positions permitted. | |
virtual bool | IsInOrder [get] |
Return true if matches are required to be in-order. | |
override string | Field [get] |
Properties inherited from Lucene.Net.Search.Spans.SpanQuery | |
abstract string | Field [get] |
Returns the name of the field matched by this query. | |
Properties inherited from Lucene.Net.Search.Query | |
virtual float | Boost [get, set] |
Gets or sets the boost for this query clause to b . Documents matching this clause will (in addition to the normal weightings) have their score multiplied by b . The boost is 1.0 by default. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Lucene.Net.Search.Query | |
static Query | MergeBooleanQueries (params BooleanQuery[] queries) |
Expert: merges the clauses of a set of BooleanQuery's into a single BooleanQuery. | |
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.
Definition at line 34 of file SpanNearQuery.cs.
Lucene.Net.Search.Spans.SpanNearQuery.SpanNearQuery | ( | SpanQuery[] | clauses, |
int | slop, | ||
bool | inOrder | ||
) |
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
.
Definition at line 48 of file SpanNearQuery.cs.
Lucene.Net.Search.Spans.SpanNearQuery.SpanNearQuery | ( | SpanQuery[] | clauses, |
int | slop, | ||
bool | inOrder, | ||
bool | collectPayloads | ||
) |
Definition at line 52 of file SpanNearQuery.cs.
|
virtual |
Returns a clone of this query.
Reimplemented from Lucene.Net.Search.Query.
Definition at line 167 of file SpanNearQuery.cs.
override bool Lucene.Net.Search.Spans.SpanNearQuery.Equals | ( | System.Object | o | ) |
Returns true iff o
is equal to this.
Definition at line 183 of file SpanNearQuery.cs.
|
virtual |
Expert: adds all terms occuring in this query to the terms set. Only works if this query is in its rewritten form.
<throws> UnsupportedOperationException if this query is not yet rewritten </throws>
Reimplemented from Lucene.Net.Search.Query.
Definition at line 100 of file SpanNearQuery.cs.
|
virtual |
Return the clauses whose spans are matched.
Definition at line 77 of file SpanNearQuery.cs.
override int Lucene.Net.Search.Spans.SpanNearQuery.GetHashCode | ( | ) |
Definition at line 211 of file SpanNearQuery.cs.
|
virtual |
Expert: Returns the matches for this query in an index. Used internally to search for spans.
Implements Lucene.Net.Search.Spans.SpanQuery.
Definition at line 129 of file SpanNearQuery.cs.
|
virtual |
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.
Reimplemented from Lucene.Net.Search.Query.
Definition at line 142 of file SpanNearQuery.cs.
|
virtual |
Prints a query to a string, with field
assumed to be the default field and omitted. The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:
Implements Lucene.Net.Search.Query.
Definition at line 108 of file SpanNearQuery.cs.
|
get |
Definition at line 96 of file SpanNearQuery.cs.
|
get |
Return true if matches are required to be in-order.
Definition at line 91 of file SpanNearQuery.cs.
|
get |
Return the maximum number of intervening unmatched positions permitted.
Definition at line 85 of file SpanNearQuery.cs.