public class SimpleTextStoredFieldsWriter extends StoredFieldsWriter
FOR RECREATIONAL USE ONLY
StoredFieldsWriter.MergeVisitor
Constructor and Description |
---|
SimpleTextStoredFieldsWriter(Directory directory,
java.lang.String segment,
IOContext context) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
finish(FieldInfos fis,
int numDocs)
Called before
StoredFieldsWriter.close() , passing in the number
of documents that were written. |
void |
startDocument()
Called before writing the stored fields of the document.
|
void |
writeField(FieldInfo info,
IndexableField field)
Writes a single stored field.
|
finishDocument, merge
public void startDocument() throws java.io.IOException
StoredFieldsWriter
StoredFieldsWriter.writeField(FieldInfo, IndexableField)
will be called
for each stored field. Note that this is
called even if the document has no stored fields.startDocument
in class StoredFieldsWriter
java.io.IOException
public void writeField(FieldInfo info, IndexableField field) throws java.io.IOException
StoredFieldsWriter
writeField
in class StoredFieldsWriter
java.io.IOException
public void finish(FieldInfos fis, int numDocs) throws java.io.IOException
StoredFieldsWriter
StoredFieldsWriter.close()
, passing in the number
of documents that were written. Note that this is
intentionally redundant (equivalent to the number of
calls to StoredFieldsWriter.startDocument()
, but a Codec should
check that this is the case to detect the JRE bug described
in LUCENE-1282.finish
in class StoredFieldsWriter
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class StoredFieldsWriter
java.io.IOException
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.