public class NearSpansUnordered extends ConjunctionSpans
NearSpansOrdered
, but for the unordered case.
Expert:
Only public for subclassing. Most implementations should not need this classModifier 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, subSpans
NO_MORE_POSITIONS
NO_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, toMatchDoc
doCurrentSpans, doStartCurrentDoc, toString
all, empty, range, slowAdvance
private final int allowedSlop
private NearSpansUnordered.SpanTotalLengthEndPositionWindow spanWindow
public NearSpansUnordered(int allowedSlop, java.util.List<Spans> subSpans) throws java.io.IOException
java.io.IOException
static boolean positionsOrdered(Spans spans1, Spans spans2)
boolean twoPhaseCurrentDocMatches() throws java.io.IOException
twoPhaseCurrentDocMatches
in class ConjunctionSpans
java.io.IOException
public int nextStartPosition() throws java.io.IOException
Spans
Spans.NO_MORE_POSITIONS
.nextStartPosition
in class Spans
java.io.IOException
public int startPosition()
Spans
Spans.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 Spans
public int endPosition()
Spans
Spans.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 Spans
public int width()
Spans
public void collect(SpanCollector collector) throws java.io.IOException
Spans
Spans.nextStartPosition()
, and before
Spans.NO_MORE_POSITIONS
has been reached.