final class DefaultIndexingChain extends DocConsumer
| Modifier and Type | Class and Description |
|---|---|
private class |
DefaultIndexingChain.PerField
NOTE: not static: accesses at least docState, termsHash.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) Counter |
bytesUsed |
(package private) DocumentsWriterPerThread.DocState |
docState |
(package private) DocumentsWriterPerThread |
docWriter |
private DefaultIndexingChain.PerField[] |
fieldHash |
(package private) FieldInfos.Builder |
fieldInfos |
private DefaultIndexingChain.PerField[] |
fields |
private int |
hashMask |
private int |
lastStoredDocID |
private long |
nextFieldGen |
private StoredFieldsWriter |
storedFieldsWriter |
(package private) TermsHash |
termsHash |
private int |
totalFieldCount |
| Constructor and Description |
|---|
DefaultIndexingChain(DocumentsWriterPerThread docWriter) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort() |
private void |
fillStoredFields(int docID)
Catch up for all docs before us that had no stored
fields, or hit non-aborting exceptions before writing
stored fields.
|
private void |
finishStoredFields()
Calls StoredFieldsWriter.finishDocument, aborting the
segment if it hits any exception.
|
void |
flush(SegmentWriteState state) |
private DefaultIndexingChain.PerField |
getOrAddField(java.lang.String name,
IndexableFieldType fieldType,
boolean invert)
Returns a previously created
DefaultIndexingChain.PerField,
absorbing the type information from FieldType,
and creates a new DefaultIndexingChain.PerField if this field name
wasn't seen yet. |
private DefaultIndexingChain.PerField |
getPerField(java.lang.String name)
Returns a previously created
DefaultIndexingChain.PerField, or null
if this field name wasn't seen yet. |
private void |
indexDocValue(DefaultIndexingChain.PerField fp,
DocValuesType dvType,
IndexableField field)
Called from processDocument to index one field's doc value
|
private void |
indexPoint(DefaultIndexingChain.PerField fp,
IndexableField field)
Called from processDocument to index one field's point
|
private void |
initStoredFieldsWriter() |
void |
processDocument() |
private int |
processField(IndexableField field,
long fieldGen,
int fieldCount) |
private void |
rehash() |
private void |
startStoredFields()
Calls StoredFieldsWriter.startDocument, aborting the
segment if it hits any exception.
|
private static void |
verifyUnIndexedFieldType(java.lang.String name,
IndexableFieldType ft) |
private void |
writeDocValues(SegmentWriteState state)
Writes all buffered doc values (called from
flush(org.apache.lucene.index.SegmentWriteState)). |
private void |
writeNorms(SegmentWriteState state) |
private void |
writePoints(SegmentWriteState state)
Writes all buffered points.
|
final Counter bytesUsed
final DocumentsWriterPerThread.DocState docState
final DocumentsWriterPerThread docWriter
final FieldInfos.Builder fieldInfos
final TermsHash termsHash
private StoredFieldsWriter storedFieldsWriter
private int lastStoredDocID
private DefaultIndexingChain.PerField[] fieldHash
private int hashMask
private int totalFieldCount
private long nextFieldGen
private DefaultIndexingChain.PerField[] fields
public DefaultIndexingChain(DocumentsWriterPerThread docWriter) throws java.io.IOException
java.io.IOExceptionprivate void initStoredFieldsWriter()
throws java.io.IOException
java.io.IOExceptionpublic void flush(SegmentWriteState state) throws java.io.IOException, AbortingException
flush in class DocConsumerjava.io.IOExceptionAbortingExceptionprivate void writePoints(SegmentWriteState state) throws java.io.IOException
java.io.IOExceptionprivate void writeDocValues(SegmentWriteState state) throws java.io.IOException
flush(org.apache.lucene.index.SegmentWriteState)).java.io.IOExceptionprivate void fillStoredFields(int docID)
throws java.io.IOException,
AbortingException
java.io.IOExceptionAbortingExceptionprivate void writeNorms(SegmentWriteState state) throws java.io.IOException
java.io.IOExceptionpublic void abort()
abort in class DocConsumerprivate void rehash()
private void startStoredFields()
throws java.io.IOException,
AbortingException
java.io.IOExceptionAbortingExceptionprivate void finishStoredFields()
throws java.io.IOException,
AbortingException
java.io.IOExceptionAbortingExceptionpublic void processDocument()
throws java.io.IOException,
AbortingException
processDocument in class DocConsumerjava.io.IOExceptionAbortingExceptionprivate int processField(IndexableField field, long fieldGen, int fieldCount) throws java.io.IOException, AbortingException
java.io.IOExceptionAbortingExceptionprivate static void verifyUnIndexedFieldType(java.lang.String name,
IndexableFieldType ft)
private void indexPoint(DefaultIndexingChain.PerField fp, IndexableField field) throws java.io.IOException
java.io.IOExceptionprivate void indexDocValue(DefaultIndexingChain.PerField fp, DocValuesType dvType, IndexableField field) throws java.io.IOException
java.io.IOExceptionprivate DefaultIndexingChain.PerField getPerField(java.lang.String name)
DefaultIndexingChain.PerField, or null
if this field name wasn't seen yet.private DefaultIndexingChain.PerField getOrAddField(java.lang.String name, IndexableFieldType fieldType, boolean invert)
DefaultIndexingChain.PerField,
absorbing the type information from FieldType,
and creates a new DefaultIndexingChain.PerField if this field name
wasn't seen yet.