|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.codecs.StoredFieldsWriter
org.apache.lucene.codecs.compressing.CompressingStoredFieldsWriter
public final class CompressingStoredFieldsWriter
StoredFieldsWriter impl for CompressingStoredFieldsFormat.
| Constructor Summary | |
|---|---|
CompressingStoredFieldsWriter(Directory directory,
SegmentInfo si,
String segmentSuffix,
IOContext context,
String formatName,
CompressionMode compressionMode,
int chunkSize)
Sole constructor. |
|
| Method Summary | |
|---|---|
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 |
finishDocument()
Called when a document and all its fields have been added. |
int |
merge(MergeState mergeState)
Merges in the stored fields from the readers in mergeState. |
void |
startDocument(int numStoredFields)
Called before writing the stored fields of the document. |
void |
writeField(FieldInfo info,
IndexableField field)
Writes a single stored field. |
| Methods inherited from class org.apache.lucene.codecs.StoredFieldsWriter |
|---|
addDocument |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompressingStoredFieldsWriter(Directory directory,
SegmentInfo si,
String segmentSuffix,
IOContext context,
String formatName,
CompressionMode compressionMode,
int chunkSize)
throws IOException
IOException| Method Detail |
|---|
public void close()
throws IOException
close in interface Closeableclose in class StoredFieldsWriterIOException
public void startDocument(int numStoredFields)
throws IOException
StoredFieldsWriterStoredFieldsWriter.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 StoredFieldsWriterIOException
public void finishDocument()
throws IOException
StoredFieldsWriter
finishDocument in class StoredFieldsWriterIOException
public void writeField(FieldInfo info,
IndexableField field)
throws IOException
StoredFieldsWriter
writeField in class StoredFieldsWriterIOExceptionpublic void abort()
StoredFieldsWriter
abort in class StoredFieldsWriter
public void finish(FieldInfos fis,
int numDocs)
throws IOException
StoredFieldsWriterStoredFieldsWriter.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 StoredFieldsWriterIOException
public int merge(MergeState mergeState)
throws IOException
StoredFieldsWritermergeState. The default implementation skips
over deleted documents, and uses StoredFieldsWriter.startDocument(int),
StoredFieldsWriter.writeField(FieldInfo, IndexableField), and StoredFieldsWriter.finish(FieldInfos, int),
returning the number of documents that were written.
Implementations can override this method for more sophisticated
merging (bulk-byte copying, etc).
merge in class StoredFieldsWriterIOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||