public class SimpleTextStoredFieldsWriter extends StoredFieldsWriter
FOR RECREATIONAL USE ONLY
Constructor and Description |
---|
SimpleTextStoredFieldsWriter(Directory directory,
String segment,
IOContext context) |
Modifier and Type | Method and Description |
---|---|
void |
abort()
Aborts writing entirely, implementation should remove
any partially-written files, etc.
|
void |
close() |
void |
finish(FieldInfos fis,
int numDocs)
Called before
StoredFieldsWriter.close() , passing in the number
of documents that were written. |
void |
startDocument(int numStoredFields)
Called before writing the stored fields of the document.
|
void |
writeField(FieldInfo info,
IndexableField field)
Writes a single stored field.
|
addDocument, finishDocument, merge
public SimpleTextStoredFieldsWriter(Directory directory, String segment, IOContext context) throws IOException
IOException
public void startDocument(int numStoredFields) throws IOException
StoredFieldsWriter
StoredFieldsWriter.writeField(FieldInfo, IndexableField)
will be called
numStoredFields
times. Note that this is
called even if the document has no stored fields, in
this case numStoredFields
will be zero.startDocument
in class StoredFieldsWriter
IOException
public void writeField(FieldInfo info, IndexableField field) throws IOException
StoredFieldsWriter
writeField
in class StoredFieldsWriter
IOException
public void abort()
StoredFieldsWriter
abort
in class StoredFieldsWriter
public void finish(FieldInfos fis, int numDocs) throws 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(int)
, but a Codec should
check that this is the case to detect the JRE bug described
in LUCENE-1282.finish
in class StoredFieldsWriter
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class StoredFieldsWriter
IOException
Copyright © 2000-2016 The Apache Software Foundation. All Rights Reserved.