|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.facet.search.OrdinalsCache
public class OrdinalsCache
A per-segment cache of documents' category ordinals. Every OrdinalsCache.CachedOrds
holds the ordinals in a raw int[]
, and therefore consumes as much RAM
as the total number of ordinals found in the segment.
NOTE: every OrdinalsCache.CachedOrds
is limited to 2.1B total ordinals. If
that is a limitation for you then consider limiting the segment size to less
documents, or use an alternative cache which pages through the category
ordinals.
NOTE: when using this cache, it is advised to use a
DocValuesFormat
that does not cache the data in memory, at least for
the category lists fields, or otherwise you'll be doing double-caching.
Nested Class Summary | |
---|---|
static class |
OrdinalsCache.CachedOrds
Holds the cached ordinals in two paralel int[] arrays. |
Constructor Summary | |
---|---|
OrdinalsCache()
|
Method Summary | |
---|---|
static void |
clear()
Clears all entries from the cache. |
static OrdinalsCache.CachedOrds |
getCachedOrds(AtomicReaderContext context,
CategoryListParams clp)
Returns the OrdinalsCache.CachedOrds relevant to the given
AtomicReaderContext , or null if there is no
BinaryDocValues in this reader for the requested
CategoryListParams.field . |
static long |
ramBytesUsed()
Returns how many bytes the static ords cache is consuming. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OrdinalsCache()
Method Detail |
---|
public static OrdinalsCache.CachedOrds getCachedOrds(AtomicReaderContext context, CategoryListParams clp) throws IOException
OrdinalsCache.CachedOrds
relevant to the given
AtomicReaderContext
, or null
if there is no
BinaryDocValues
in this reader for the requested
CategoryListParams.field
.
IOException
public static long ramBytesUsed()
public static void clear()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |