public interface PositionsIterator
This class iterates on positions. The sentinel value
NO_MORE_POS (which is set to 2147483647) is used to
indicate the end of the position stream.
To be used in conjunction with DocsAndNodesIterator.
| Modifier and Type | Field and Description |
|---|---|
static int |
NO_MORE_POS
When returned by
pos() it means there are no more
positions in the iterator. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
nextPosition()
Move to the next position in the current node matching the query.
|
int |
pos()
Returns the following:
-1 or
NO_MORE_POS if nextPosition() were not called
yet. |
static final int NO_MORE_POS
pos() it means there are no more
positions in the iterator.boolean nextPosition()
throws IOException
Should not be called until DocsAndNodesIterator.nextNode() or
DocsAndNodesIterator#skipTo(int, int) are called for the first
time.
DocsAndNodesIterator.nextNode() or
DocsAndNodesIterator#skipTo(int, int) were not called yet.IOExceptionint pos()
NO_MORE_POS if nextPosition() were not called
yet.
NO_MORE_POS if the iterator has exhausted.
Copyright © 2014. All rights reserved.