Class 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.
Inheritance
Assembly: DistributedLucene.Net.dll
Syntax
public abstract class Spans : object
Properties
Name | Description |
---|---|
Doc | Returns the document number of the current match. Initially invalid. |
End | Returns the end position of the current match. Initially invalid. |
IsPayloadAvailable | Checks if a payload can be loaded at this position. Payloads can only be loaded once per call to Next(). |
Start | Returns the start position of the current match. Initially invalid. |
Methods
Name | Description |
---|---|
GetCost() | Returns the estimated cost of this spans. This is generally an upper bound of the number of documents this iterator might match, but may be a rough heuristic, hardcoded value, or otherwise completely inaccurate. |
GetPayload() | Returns the payload data for the current span. this is invalid until Next() is called for the first time. This method must not be called more than once after each call of Next(). However, most payloads are loaded lazily, so if the payload data for the current position is not needed, this method may not be called at all for performance reasons. An ordered SpanQuery does not lazy load, so if you have payloads in your index and you do not want ordered SpanNearQuerys to collect payloads, you can disable collection with a constructor option. Note that the return type is a collection, thus the ordering should not be relied upon. @lucene.experimental |
Next() | Move to the next match, returning true if any such exists. |
SkipTo(Int32) | Skips to the first match beyond the current, whose document number is greater than or equal to target. The behavior of this method is undefined when called with
Returns Behaves as if written:
Most implementations are considerably more efficient than that. |