public class OrdinalsCache extends Object
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
OrdinalsCache.CachedOrds
Holds the cached ordinals in two paralel
int[] arrays. |
| Constructor and Description |
|---|
OrdinalsCache() |
| Modifier and Type | Method and Description |
|---|---|
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. |
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.IOExceptionCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.