Example usage for Java org.apache.lucene.search.spans Spans fields, constructors, methods, implement or subclass
The text is from its open source code.
int | advance(int target) Advances to the first beyond the current whose document number is greater than or equal to target, and returns the document number itself. |
TwoPhaseIterator | asTwoPhaseIterator() Optional method: Return a TwoPhaseIterator view of this Scorer . |
void | collect(SpanCollector collector) Collect postings data from the leaves of the current Spans. |
long | cost() Returns the estimated cost of this DocIdSetIterator . |
int | docID() Returns the following:
|
int | endPosition() Returns the end position for the current start position, or -1 when #nextStartPosition was not yet called on the current doc. |
int | nextDoc() Advances to the next document in the set and returns the doc it is currently on, or #NO_MORE_DOCS if there are no more docs in the set. NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior. |
int | nextStartPosition() Returns the next start position for the current doc. |
float | positionsCost() Return an estimation of the cost of using the positions of this Spans for any single document, but only after #asTwoPhaseIterator returned null . |
int | startPosition() Returns the start position in the current doc, or -1 when #nextStartPosition was not yet called on the current doc. |
int | width() Return the width of the match, which is typically used to sloppy freq. |