org.apache.lucene.search
Class FieldCache.DocTermsIndex

java.lang.Object
  extended by org.apache.lucene.search.FieldCache.DocTermsIndex
Enclosing interface:
FieldCache

public abstract static class FieldCache.DocTermsIndex
extends Object

Returned by FieldCache.getTermsIndex(org.apache.lucene.index.AtomicReader, java.lang.String)


Constructor Summary
FieldCache.DocTermsIndex()
           
 
Method Summary
 int binarySearchLookup(BytesRef key, BytesRef spare)
           
abstract  PackedInts.Reader getDocToOrd()
           
abstract  int getOrd(int docID)
          Returns sort ord for this document.
 BytesRef getTerm(int docID, BytesRef reuse)
          Convenience method, to lookup the Term for a doc.
abstract  TermsEnum getTermsEnum()
          Returns a TermsEnum that can iterate over the values in this index entry
abstract  BytesRef lookup(int ord, BytesRef reuse)
          The BytesRef argument must not be null; the method returns the same BytesRef, or an empty (length=0) BytesRef if this ord is the null ord (0).
abstract  int numOrd()
          Returns total unique ord count; this includes +1 for the null ord (always 0).
abstract  int size()
          Number of documents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldCache.DocTermsIndex

public FieldCache.DocTermsIndex()
Method Detail

binarySearchLookup

public int binarySearchLookup(BytesRef key,
                              BytesRef spare)

lookup

public abstract BytesRef lookup(int ord,
                                BytesRef reuse)
The BytesRef argument must not be null; the method returns the same BytesRef, or an empty (length=0) BytesRef if this ord is the null ord (0).


getTerm

public BytesRef getTerm(int docID,
                        BytesRef reuse)
Convenience method, to lookup the Term for a doc. If this doc is deleted or did not have this field, this will return an empty (length=0) BytesRef.


getOrd

public abstract int getOrd(int docID)
Returns sort ord for this document. Ord 0 is reserved for docs that are deleted or did not have this field.


numOrd

public abstract int numOrd()
Returns total unique ord count; this includes +1 for the null ord (always 0).


size

public abstract int size()
Number of documents


getTermsEnum

public abstract TermsEnum getTermsEnum()
Returns a TermsEnum that can iterate over the values in this index entry


getDocToOrd

public abstract PackedInts.Reader getDocToOrd()
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.