public class MultiDocValues extends DocValues
DocValues
NOTE: for multi readers, you'll get better
performance by gathering the sub readers using
IndexReader.getTopReaderContext() to get the
atomic leaves and then operate per-AtomicReader,
instead of using this class.
| Modifier and Type | Class and Description |
|---|---|
static class |
MultiDocValues.DocValuesSlice |
static class |
MultiDocValues.EmptyDocValues |
static class |
MultiDocValues.EmptyFixedDocValues |
DocValues.SortedSource, DocValues.Source, DocValues.SourceCache, DocValues.TypeEMPTY_ARRAY| Modifier and Type | Method and Description |
|---|---|
DocValues.Source |
getDirectSource()
Returns a disk resident
DocValues.Source instance. |
static DocValues |
getDocValues(IndexReader r,
String field)
Returns a single
DocValues instance for this field, merging
their values on the fly. |
static DocValues |
getNormDocValues(IndexReader r,
String field)
Returns a single
DocValues instance for this norms field, merging
their values on the fly. |
DocValues.Type |
getType()
Returns the
DocValues.Type of this DocValues instance |
int |
getValueSize()
Returns the size per value in bytes or
-1 iff size per value
is variable. |
DocValues.Source |
load()
Loads a new
DocValues.Source instance for this DocValues field
instance. |
close, getDefaultSortedSource, getDefaultSource, getSource, setCachepublic static DocValues getDocValues(IndexReader r, String field) throws IOException
DocValues instance for this field, merging
their values on the fly.
NOTE: this is a slow way to access DocValues. It's better to get the sub-readers and iterate through them yourself.
IOExceptionpublic static DocValues getNormDocValues(IndexReader r, String field) throws IOException
DocValues instance for this norms field, merging
their values on the fly.
NOTE: this is a slow way to access DocValues. It's better to get the sub-readers and iterate through them yourself.
IOExceptionpublic DocValues.Source load() throws IOException
DocValuesDocValues.Source instance for this DocValues field
instance. Source instances returned from this method are not cached. It is
the callers responsibility to maintain the instance and release its
resources once the source is not needed anymore.
For managed DocValues.Source instances see DocValues.getSource().
load in class DocValuesIOExceptionDocValues.getSource(),
DocValues.setCache(SourceCache)public DocValues.Type getType()
DocValuesDocValues.Type of this DocValues instancepublic int getValueSize()
DocValues-1 iff size per value
is variable.getValueSize in class DocValues-1 iff size per value
is variable.public DocValues.Source getDirectSource() throws IOException
DocValuesDocValues.Source instance. Direct Sources are not
cached in the DocValues.SourceCache and should not be shared between threads.getDirectSource in class DocValuesIOExceptionCopyright © 2000-2012 Apache Software Foundation. All Rights Reserved.