public abstract class PerDocProducerBase extends PerDocProducer
| Constructor and Description |
|---|
PerDocProducerBase() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
anyDocValuesFields(FieldInfos infos) |
protected boolean |
canLoad(FieldInfo info) |
void |
close() |
protected abstract void |
closeInternal(Collection<? extends Closeable> closeables) |
protected abstract Map<String,DocValues> |
docValues() |
DocValues |
docValues(String field)
Returns
DocValues for the current field. |
static String |
docValuesId(String segmentsName,
int fieldId) |
Comparator<BytesRef> |
getComparator() |
protected DocValues.Type |
getDocValuesType(FieldInfo info) |
protected TreeMap<String,DocValues> |
load(FieldInfos fieldInfos,
String segment,
int docCount,
Directory dir,
IOContext context) |
protected abstract DocValues |
loadDocValues(int docCount,
Directory dir,
String id,
DocValues.Type type,
IOContext context)
Loads a
DocValues instance depending on the given DocValues.Type. |
protected abstract void closeInternal(Collection<? extends Closeable> closeables) throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionpublic DocValues docValues(String field) throws IOException
PerDocProducerDocValues for the current field.docValues in class PerDocProducerfield - the field nameDocValues for this field or null if not
applicable.IOExceptionpublic Comparator<BytesRef> getComparator() throws IOException
IOExceptionprotected TreeMap<String,DocValues> load(FieldInfos fieldInfos, String segment, int docCount, Directory dir, IOContext context) throws IOException
IOExceptionprotected boolean canLoad(FieldInfo info)
protected DocValues.Type getDocValuesType(FieldInfo info)
protected boolean anyDocValuesFields(FieldInfos infos)
protected abstract DocValues loadDocValues(int docCount, Directory dir, String id, DocValues.Type type, IOContext context) throws IOException
DocValues instance depending on the given DocValues.Type.
Codecs that use different implementations for a certain DocValues.Type can
simply override this method and return their custom implementations.docCount - number of documents in the segmentdir - the Directory to load the DocValues fromid - the unique file ID within the segmenttype - the type to loadDocValues instance for the given typeIOException - if an IOException occursIllegalArgumentException - if the given DocValues.Type is not supportedCopyright © 2000-2012 Apache Software Foundation. All Rights Reserved.