Class Lucene90CompressingStoredFieldsWriter
java.lang.Object
org.apache.lucene.codecs.StoredFieldsWriter
org.apache.lucene.codecs.lucene90.compressing.Lucene90CompressingStoredFieldsWriter
- All Implemented Interfaces:
Closeable,AutoCloseable,Accountable
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.codecs.StoredFieldsWriter
StoredFieldsWriter.MergeVisitor -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringExtension of stored fields filestatic final StringCodec name for the index.static final StringExtension of stored fields indexstatic final StringExtension of stored fields metaFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidfinish(int numDocs) Called beforeStoredFieldsWriter.close(), passing in the number of documents that were written.voidCalled when a document and all its fields have been added.intmerge(MergeState mergeState) Merges in the stored fields from the readers inmergeState.longReturn the memory usage of this object in bytes.voidCalled before writing the stored fields of the document.voidwriteField(FieldInfo info, double value) Writes a stored double value.voidwriteField(FieldInfo info, float value) Writes a stored float value.voidwriteField(FieldInfo info, int value) Writes a stored int value.voidwriteField(FieldInfo info, long value) Writes a stored long value.voidwriteField(FieldInfo info, String value) Writes a stored String value.voidwriteField(FieldInfo info, StoredFieldDataInput value) Writes a stored binary value from aStoredFieldDataInput.voidwriteField(FieldInfo info, BytesRef value) Writes a stored binary value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Field Details
-
FIELDS_EXTENSION
Extension of stored fields file- See Also:
-
INDEX_EXTENSION
Extension of stored fields index- See Also:
-
META_EXTENSION
Extension of stored fields meta- See Also:
-
INDEX_CODEC_NAME
Codec name for the index.- See Also:
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classStoredFieldsWriter- Throws:
IOException
-
startDocument
Description copied from class:StoredFieldsWriterCalled before writing the stored fields of the document.writeFieldwill be called for each stored field. Note that this is called even if the document has no stored fields.- Specified by:
startDocumentin classStoredFieldsWriter- Throws:
IOException
-
finishDocument
Description copied from class:StoredFieldsWriterCalled when a document and all its fields have been added.- Overrides:
finishDocumentin classStoredFieldsWriter- Throws:
IOException
-
writeField
Description copied from class:StoredFieldsWriterWrites a stored int value.- Specified by:
writeFieldin classStoredFieldsWriter- Throws:
IOException
-
writeField
Description copied from class:StoredFieldsWriterWrites a stored long value.- Specified by:
writeFieldin classStoredFieldsWriter- Throws:
IOException
-
writeField
Description copied from class:StoredFieldsWriterWrites a stored float value.- Specified by:
writeFieldin classStoredFieldsWriter- Throws:
IOException
-
writeField
Description copied from class:StoredFieldsWriterWrites a stored double value.- Specified by:
writeFieldin classStoredFieldsWriter- Throws:
IOException
-
writeField
Description copied from class:StoredFieldsWriterWrites a stored binary value.- Specified by:
writeFieldin classStoredFieldsWriter- Throws:
IOException
-
writeField
Description copied from class:StoredFieldsWriterWrites a stored binary value from aStoredFieldDataInput.- Overrides:
writeFieldin classStoredFieldsWriter- Throws:
IOException
-
writeField
Description copied from class:StoredFieldsWriterWrites a stored String value.- Specified by:
writeFieldin classStoredFieldsWriter- Throws:
IOException
-
finish
Description copied from class:StoredFieldsWriterCalled beforeStoredFieldsWriter.close(), passing in the number of documents that were written. Note that this is intentionally redundant (equivalent to the number of calls toStoredFieldsWriter.startDocument(), but a Codec should check that this is the case to detect the JRE bug described in LUCENE-1282.- Specified by:
finishin classStoredFieldsWriter- Throws:
IOException
-
merge
Description copied from class:StoredFieldsWriterMerges in the stored fields from the readers inmergeState. The default implementation skips over deleted documents, and usesStoredFieldsWriter.startDocument(),writeField, andStoredFieldsWriter.finish(int), returning the number of documents that were written. Implementations can override this method for more sophisticated merging (bulk-byte copying, etc).- Overrides:
mergein classStoredFieldsWriter- Throws:
IOException
-
ramBytesUsed
public long ramBytesUsed()Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal.
-