public class NearSpansUnordered extends ConjunctionSpans
NearSpansOrdered, but for the unordered case.
Expert:
Only public for subclassing. Most implementations should not need this class| Modifier and Type | Class and Description |
|---|---|
private class |
NearSpansUnordered.SpanTotalLengthEndPositionWindow
Maintain totalSpanLength and maxEndPosition
|
| Modifier and Type | Field and Description |
|---|---|
private int |
allowedSlop |
private NearSpansUnordered.SpanTotalLengthEndPositionWindow |
spanWindow |
atFirstInCurrentDoc, conjunction, oneExhaustedInCurrentDoc, subSpansNO_MORE_POSITIONSNO_MORE_DOCS| Constructor and Description |
|---|
NearSpansUnordered(int allowedSlop,
java.util.List<Spans> subSpans) |
| Modifier and Type | Method and Description |
|---|---|
void |
collect(SpanCollector collector)
Collect postings data from the leaves of the current Spans.
|
int |
endPosition()
Returns the end position for the current start position, or -1 when
Spans.nextStartPosition() was not yet called on the current doc. |
int |
nextStartPosition()
Returns the next start position for the current doc.
|
(package private) static boolean |
positionsOrdered(Spans spans1,
Spans spans2)
Check whether two Spans in the same document are ordered with possible overlap.
|
int |
startPosition()
Returns the start position in the current doc, or -1 when
Spans.nextStartPosition() was not yet called on the current doc. |
(package private) boolean |
twoPhaseCurrentDocMatches() |
int |
width()
Return the width of the match, which is typically used to sloppy freq.
|
advance, asTwoPhaseIterator, cost, docID, getSubSpans, nextDoc, positionsCost, toMatchDocdoCurrentSpans, doStartCurrentDoc, toStringall, empty, range, slowAdvanceprivate final int allowedSlop
private NearSpansUnordered.SpanTotalLengthEndPositionWindow spanWindow
public NearSpansUnordered(int allowedSlop,
java.util.List<Spans> subSpans)
throws java.io.IOException
java.io.IOExceptionstatic boolean positionsOrdered(Spans spans1, Spans spans2)
boolean twoPhaseCurrentDocMatches()
throws java.io.IOException
twoPhaseCurrentDocMatches in class ConjunctionSpansjava.io.IOExceptionpublic int nextStartPosition()
throws java.io.IOException
SpansSpans.NO_MORE_POSITIONS.nextStartPosition in class Spansjava.io.IOExceptionpublic int startPosition()
SpansSpans.nextStartPosition() was not yet called on the current doc.
After the last start/end position at the current doc this returns Spans.NO_MORE_POSITIONS.startPosition in class Spanspublic int endPosition()
SpansSpans.nextStartPosition() was not yet called on the current doc.
After the last start/end position at the current doc this returns Spans.NO_MORE_POSITIONS.endPosition in class Spanspublic int width()
Spanspublic void collect(SpanCollector collector) throws java.io.IOException
SpansSpans.nextStartPosition(), and before
Spans.NO_MORE_POSITIONS has been reached.