public class AssociationsPayloadIterator extends Object
Modifier and Type | Field and Description |
---|---|
static Term |
ASSOCIATION_POSTING_TERM
Default Term for associations
|
static long |
NO_ASSOCIATION
The long-special-value returned for ordinals which have no associated int
value.
|
Constructor and Description |
---|
AssociationsPayloadIterator(IndexReader reader,
String field)
Construct a new association-iterator, initializing the inner payload
iterator, with the supplied term and checking whether there are any
associations within the given index
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
IntIterator |
getAssociatedOrdinals()
Get an iterator over the ordinals which has an association for the
document set by
setNextDoc(int) . |
long |
getAssociation(int ordinal)
Get int association value for the given ordinal.
|
int |
hashCode() |
boolean |
setNextDoc(int docId)
Skipping to the next document, fetching its associations & populating the
map.
|
public static final Term ASSOCIATION_POSTING_TERM
public static final long NO_ASSOCIATION
public AssociationsPayloadIterator(IndexReader reader, String field) throws IOException
reader
- a reader containing the postings to be iteratedfield
- the field containing the relevant associations list termIOException
public boolean setNextDoc(int docId) throws IOException
docId
- document id to be skipped toIOException
- on errorpublic long getAssociation(int ordinal)
NO_ASSOCIATION
which is 'pure long' value (e.g not in the int
range of values)ordinal
- for which the association value is requestedNO_ASSOCIATION
otherwisepublic IntIterator getAssociatedOrdinals()
setNextDoc(int)
.