public interface Spans
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
boolean next() throws IOException
IOException
boolean skipTo(int target) throws IOException
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.
IOException
int doc()
int start()
int end()
float score()
Explanation explain() throws IOException
IOException