[Missing <summary> documentation for "N:Lucene.Net.Search.Spans"]
Classes
Class | Description | |
---|---|---|
FieldMaskingSpanQuery | Wrapper to allow {@link SpanQuery} objects participate in composite
single-field SpanQueries by 'lying' about their search field. That is,
the masked SpanQuery will function as normal,
but {@link SpanQuery#GetField()} simply hands back the value supplied
in this class's constructor.This can be used to support Queries like {@link SpanNearQuery} or
{@link SpanOrQuery} across different fields, which is not ordinarily
permitted.This can be useful for denormalized relational data: for example, when
indexing a document with conceptually many 'children': teacherid: 1 studentfirstname: james studentsurname: jones teacherid: 2 studenfirstname: james studentsurname: smith studentfirstname: sally studentsurname: jonesa SpanNearQuery with a slop of 0 can be applied across two {@link SpanTermQuery} objects as follows: SpanQuery q1 = new SpanTermQuery(new Term("studentfirstname", "james")); SpanQuery q2 = new SpanTermQuery(new Term("studentsurname", "jones")); SpanQuery q2m new FieldMaskingSpanQuery(q2, "studentfirstname"); Query q = new SpanNearQuery(new SpanQuery[]{q1, q2m}, -1, false);to search for 'studentfirstname:james studentsurname:jones' and find teacherid 1 without matching teacherid 2 (which has a 'james' in position 0 and 'jones' in position 1). Note: as {@link #GetField()} returns the masked field, scoring will be done using the norms of the field name supplied. This may lead to unexpected scoring behaviour. | |
NearSpansOrdered | A Spans that is formed from the ordered subspans of a SpanNearQuery
where the subspans do not overlap and have a maximum slop between them.
The formed spans only contains minimum slop matches. The matching slop is computed from the distance(s) between the non overlapping matching Spans. Successive matches are always formed from the successive Spans of the SpanNearQuery. The formed spans may contain overlaps when the slop is at least 1. For example, when querying using t1 t2 t3with slop at least 1, the fragment: t1 t2 t1 t3 t2 t3matches twice: t1 t2 .. t3 t1 .. t2 t3Expert: Only public for subclassing. Most implementations should not need this class | |
NearSpansUnordered | Similar to {@link NearSpansOrdered}, but for the unordered case.
Expert:
Only public for subclassing. Most implementations should not need this class
| |
SpanFirstQuery | Matches spans near the beginning of a field. | |
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.
| |
SpanNotQuery | Removes matches which overlap with another SpanQuery. | |
SpanOrQuery | Matches the union of its clauses. | |
SpanQuery | Base class for span-based queries. | |
Spans | Expert: an enumeration of span matches. Used to implement span searching.
Each span represents a range of term positions within a document. Matches
are enumerated in order, by increasing document number, within that by
increasing start position and finally by increasing end position.
| |
SpanScorer | Public for extension only. | |
SpanTermQuery | Matches spans containing a term. | |
SpanWeight | Expert-only. Public for use by other weight implementations | |
TermSpans | Expert:
Public for extension only
|