Method Summary

Checks the internal cache for an appropriate entry, and if none is
found, reads the terms in field as a single byte and returns an array
of size reader.maxDoc() of the value each document
has in the given field.

Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in field as bytes and returns an array of
size reader.maxDoc() of the value each document has in the
given field.

Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in field and returns a bit set at the size of
reader.maxDoc(), with turned on bits for each docid that
does have a value for this field.

Checks the internal cache for an appropriate entry, and if none is found, reads the term values
in field and returns a DocTermOrds instance, providing a method to retrieve
the terms (as ords) per document.

Checks the internal cache for an appropriate entry, and if none is
found, reads the terms in field as integers and returns an array
of size reader.maxDoc() of the value each document
has in the given field.

Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in field as doubles and returns an array of
size reader.maxDoc() of the value each document has in the
given field.

Checks the internal cache for an appropriate entry, and if
none is found, reads the terms in field as floats and returns an array
of size reader.maxDoc() of the value each document
has in the given field.

Checks the internal cache for an appropriate entry, and if
none is found, reads the terms in field as floats and returns an array
of size reader.maxDoc() of the value each document
has in the given field.

Checks the internal cache for an appropriate entry, and if none is
found, reads the terms in field as integers and returns an array
of size reader.maxDoc() of the value each document
has in the given field.

Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in field as integers and returns an array of
size reader.maxDoc() of the value each document has in the
given field.

Checks the internal cache for an appropriate entry, and if none is
found, reads the terms in field as longs and returns an array
of size reader.maxDoc() of the value each document
has in the given field.

Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in field as longs and returns an array of
size reader.maxDoc() of the value each document has in the
given field.

Checks the internal cache for an appropriate entry, and if none is
found, reads the terms in field as shorts and returns an array
of size reader.maxDoc() of the value each document
has in the given field.

Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in field as shorts and returns an array of
size reader.maxDoc() of the value each document has in the
given field.

Checks the internal cache for an appropriate entry, and if none
is found, reads the term values in field
and returns a FieldCache.DocTerms instance, providing a
method to retrieve the term (as a BytesRef) per document.

Checks the internal cache for an appropriate entry, and if none
is found, reads the term values in field
and returns a FieldCache.DocTerms instance, providing a
method to retrieve the term (as a BytesRef) per document.

Method Detail

getDocsWithField

Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in field and returns a bit set at the size of
reader.maxDoc(), with turned on bits for each docid that
does have a value for this field.

getBytes

Checks the internal cache for an appropriate entry, and if none is
found, reads the terms in field as a single byte and returns an array
of size reader.maxDoc() of the value each document
has in the given field.

getBytes

Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in field as bytes and returns an array of
size reader.maxDoc() of the value each document has in the
given field.

getShorts

Checks the internal cache for an appropriate entry, and if none is
found, reads the terms in field as shorts and returns an array
of size reader.maxDoc() of the value each document
has in the given field.

getShorts

Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in field as shorts and returns an array of
size reader.maxDoc() of the value each document has in the
given field.

getInts

Checks the internal cache for an appropriate entry, and if none is
found, reads the terms in field as integers and returns an array
of size reader.maxDoc() of the value each document
has in the given field.

getInts

Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in field as integers and returns an array of
size reader.maxDoc() of the value each document has in the
given field.

getFloats

Checks the internal cache for an appropriate entry, and if
none is found, reads the terms in field as floats and returns an array
of size reader.maxDoc() of the value each document
has in the given field.

getFloats

Checks the internal cache for an appropriate entry, and if
none is found, reads the terms in field as floats and returns an array
of size reader.maxDoc() of the value each document
has in the given field.

getLongs

Checks the internal cache for an appropriate entry, and if none is
found, reads the terms in field as longs and returns an array
of size reader.maxDoc() of the value each document
has in the given field.

getLongs

Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in field as longs and returns an array of
size reader.maxDoc() of the value each document has in the
given field.

getDoubles

Checks the internal cache for an appropriate entry, and if none is
found, reads the terms in field as integers and returns an array
of size reader.maxDoc() of the value each document
has in the given field.

getDoubles

Checks the internal cache for an appropriate entry, and if none is found,
reads the terms in field as doubles and returns an array of
size reader.maxDoc() of the value each document has in the
given field.

getTerms

Checks the internal cache for an appropriate entry, and if none
is found, reads the term values in field
and returns a FieldCache.DocTerms instance, providing a
method to retrieve the term (as a BytesRef) per document.

getTerms

Expert: just like getTerms(AtomicReader,String),
but you can specify whether more RAM should be consumed in exchange for
faster lookups (default is "true"). Note that the
first call for a given reader and field "wins",
subsequent calls will share the same cache entry.

getTermsIndex

Checks the internal cache for an appropriate entry, and if none
is found, reads the term values in field
and returns a FieldCache.DocTerms instance, providing a
method to retrieve the term (as a BytesRef) per document.

getTermsIndex

Expert: just like getTermsIndex(AtomicReader,String), but you can specify
whether more RAM should be consumed in exchange for
faster lookups (default is "true"). Note that the
first call for a given reader and field "wins",
subsequent calls will share the same cache entry.

getDocTermOrds

Checks the internal cache for an appropriate entry, and if none is found, reads the term values
in field and returns a DocTermOrds instance, providing a method to retrieve
the terms (as ords) per document.

getCacheEntries

EXPERT: Generates an array of CacheEntry objects representing all items
currently in the FieldCache.

NOTE: These CacheEntry objects maintain a strong reference to the
Cached Values. Maintaining references to a CacheEntry the AtomicIndexReader
associated with it has garbage collected will prevent the Value itself
from being garbage collected when the Cache drops the WeakReference.

WARNING: This API is experimental and might change in incompatible ways in the next release.

purgeAllCaches

void purgeAllCaches()

EXPERT: Instructs the FieldCache to forcibly expunge all entries
from the underlying caches. This is intended only to be used for
test methods as a way to ensure a known base state of the Cache
(with out needing to rely on GC to free WeakReferences).
It should not be relied on for "Cache maintenance" in general
application code.

WARNING: This API is experimental and might change in incompatible ways in the next release.

purge

Expert: drops all cache entries associated with this
reader. NOTE: this reader must precisely match the
reader that the cache entry is keyed on. If you pass a
top-level reader, it usually will have no effect as
Lucene now caches at the segment reader level.