|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.facet.enhancements.association.AssociationsPayloadIterator
public class AssociationsPayloadIterator
Allows easy iteration over the associations payload, decoding and breaking it to (ordinal, value) pairs, stored in a hash.
Field Summary | |
---|---|
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 Summary | |
---|---|
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 |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Term ASSOCIATION_POSTING_TERM
public static final long NO_ASSOCIATION
Constructor Detail |
---|
public AssociationsPayloadIterator(IndexReader reader, String field) throws IOException
reader
- a reader containing the postings to be iteratedfield
- the field containing the relevant associations list term
IOException
Method Detail |
---|
public boolean setNextDoc(int docId) throws IOException
docId
- document id to be skipped to
IOException
- 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 requested
NO_ASSOCIATION
otherwisepublic IntIterator getAssociatedOrdinals()
setNextDoc(int)
.
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |