|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.codecs.PerDocProducer
org.apache.lucene.codecs.PerDocProducerBase
public abstract class PerDocProducerBase
Abstract base class for PerDocProducer implementations
| Constructor Summary | |
|---|---|
protected |
PerDocProducerBase()
Sole constructor. |
| Method Summary | |
|---|---|
protected boolean |
anyDocValuesFields(FieldInfos infos)
Returns true if any fields indexed doc values. |
protected boolean |
canLoad(FieldInfo info)
Returns true if this field indexed doc values. |
void |
close()
|
protected abstract void |
closeInternal(Collection<? extends Closeable> closeables)
Closes provided Closables. |
protected abstract Map<String,DocValues> |
docValues()
Returns a map, mapping field names to doc values. |
DocValues |
docValues(String field)
Returns DocValues for the current field. |
static String |
docValuesId(String segmentsName,
int fieldId)
Returns the unique segment and field id for any per-field files this implementation needs to write. |
Comparator<BytesRef> |
getComparator()
Returns the comparator used to sort BytesRef values. |
protected DocValues.Type |
getDocValuesType(FieldInfo info)
Returns the doc values type for this field. |
protected TreeMap<String,DocValues> |
load(FieldInfos fieldInfos,
String segment,
int docCount,
Directory dir,
IOContext context)
Only opens files... |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected PerDocProducerBase()
| Method Detail |
|---|
protected abstract void closeInternal(Collection<? extends Closeable> closeables)
throws IOException
IOExceptionprotected abstract Map<String,DocValues> docValues()
public void close()
throws IOException
close in interface Closeableclose in class PerDocProducerIOException
public DocValues docValues(String field)
throws IOException
PerDocProducerDocValues for the current field.
docValues in class PerDocProducerfield - the field name
DocValues for this field or null if not
applicable.
IOException - If an I/O error occurs
public Comparator<BytesRef> getComparator()
throws IOException
BytesRef values.
IOException
protected 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)
public static String docValuesId(String segmentsName,
int fieldId)
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 load
DocValues instance for the given type
IOException - if an IOException occurs
IllegalArgumentException - if the given DocValues.Type is not supported
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||