Modifier and Type | Class and Description |
---|---|
private class |
NearSpans.SpansCell
Wraps a Spans, and can be used to form a linked list.
|
Modifier and Type | Field and Description |
---|---|
private NearSpans.SpansCell |
firstCell |
private boolean |
firstTime |
private boolean |
inOrder |
private NearSpans.SpansCell |
lastCell |
private boolean |
more |
private int |
nCellsInList |
private List |
ordered |
private SpanNearQuery |
query |
private Similarity |
similarity |
private int |
slop |
private int |
totalLength |
private float |
totalScore |
private int |
totalSlop |
Constructor and Description |
---|
NearSpans(SpanNearQuery query,
IndexReader reader,
Searcher searcher) |
Modifier and Type | Method and Description |
---|---|
private boolean |
advanceOneCell() |
private boolean |
atMatch() |
private boolean |
checkSlop() |
int |
doc()
Returns the document number of the current match.
|
int |
end()
Returns the end position of the current match.
|
Explanation |
explain()
Returns an explanation of how the score was arrived at.
|
private void |
initList(int target) |
private boolean |
matchIsOrdered() |
boolean |
next()
Move to the next match, returning true iff any such exists.
|
float |
score()
Returns the score of the current match.
|
boolean |
skipTo(int target)
Skips to the first match beyond the current, whose document number is
greater than or equal to target.
|
int |
start()
Returns the start position of the current match.
|
String |
toString() |
private int |
totalSlop() |
private SpanNearQuery query
private Similarity similarity
private List ordered
private int slop
private boolean inOrder
private NearSpans.SpansCell firstCell
private NearSpans.SpansCell lastCell
private int nCellsInList
private int totalLength
private float totalScore
private int totalSlop
private boolean more
private boolean firstTime
public NearSpans(SpanNearQuery query, IndexReader reader, Searcher searcher) throws IOException
IOException
public boolean next() throws IOException
Spans
private boolean advanceOneCell() throws IOException
IOException
public boolean skipTo(int target) throws IOException
Spans
Returns true iff there is such a match.
Behaves as if written:
boolean skipTo(int target) { do { if (!next()) return false; } while (target > doc()); return true; }Most implementations are considerably more efficient than that.
public int doc()
Spans
public int start()
Spans
public int end()
Spans
public float score()
Spans
public String toString()
toString
in class Object
private void initList(int target) throws IOException
IOException
private boolean atMatch()
private boolean checkSlop()
private boolean matchIsOrdered()
private int totalSlop()