Modifier and Type | Field and Description |
---|---|
private int |
index |
private int |
length |
private NearSpans.SpansCell |
nextCell |
private NearSpans.SpansCell |
prevCell |
private float |
score |
private Spans |
spans |
Modifier and Type | Method and Description |
---|---|
void |
adjustPosition() |
private void |
checkList()
Debugging only: check that the links are all correct
|
void |
collectTerms(Set terms) |
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 |
fixLinks()
Helper function for linkAfter and linkBefore
|
private boolean |
lessThan(NearSpans.SpansCell otherCell)
Ordering function for cells in the list
|
private void |
linkAfter(NearSpans.SpansCell other)
Link the cell into the list just after 'other', or at the head if null
|
private void |
linkBefore(NearSpans.SpansCell other)
Link the cell into the list just before 'other', or at the tail if null
|
boolean |
next()
Move to the next match, returning true iff any such exists.
|
private void |
postChange()
Called just after advancing the cell
|
private void |
preChange()
Called just before advancing the cell
|
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 void |
unlink()
Remove the current cell from the linked list
|
private Spans spans
private NearSpans.SpansCell prevCell
private NearSpans.SpansCell nextCell
private int length
private float score
private int index
public SpansCell(Spans spans, int index)
public boolean next() throws IOException
Spans
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.
private void preChange()
private void postChange()
public void adjustPosition()
private void unlink()
private void linkBefore(NearSpans.SpansCell other)
private void linkAfter(NearSpans.SpansCell other)
private void fixLinks()
private void checkList()
private final boolean lessThan(NearSpans.SpansCell otherCell)
public int doc()
Spans
public int start()
Spans
public int end()
Spans
public float score()
Spans
public Explanation explain() throws IOException
Spans
public void collectTerms(Set terms)
public String toString()
toString
in class Object