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
Modifier and TypeFieldDescriptionstatic final String
Extension of stored fields filestatic final String
Codec name for the index.static final String
Extension of stored fields indexstatic final String
Extension of stored fields metaFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
finish
(int numDocs) Called beforeStoredFieldsWriter.close()
, passing in the number of documents that were written.void
Called when a document and all its fields have been added.int
merge
(MergeState mergeState) Merges in the stored fields from the readers inmergeState
.long
Return the memory usage of this object in bytes.void
Called before writing the stored fields of the document.void
writeField
(FieldInfo info, IndexableField field) Writes a single stored field.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classStoredFieldsWriter
- Throws:
IOException
-
startDocument
Description copied from class:StoredFieldsWriter
Called before writing the stored fields of the document.StoredFieldsWriter.writeField(FieldInfo, IndexableField)
will be called for each stored field. Note that this is called even if the document has no stored fields.- Specified by:
startDocument
in classStoredFieldsWriter
- Throws:
IOException
-
finishDocument
Description copied from class:StoredFieldsWriter
Called when a document and all its fields have been added.- Overrides:
finishDocument
in classStoredFieldsWriter
- Throws:
IOException
-
writeField
Description copied from class:StoredFieldsWriter
Writes a single stored field.- Specified by:
writeField
in classStoredFieldsWriter
- Throws:
IOException
-
finish
Description copied from class:StoredFieldsWriter
Called 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:
finish
in classStoredFieldsWriter
- Throws:
IOException
-
merge
Description copied from class:StoredFieldsWriter
Merges in the stored fields from the readers inmergeState
. The default implementation skips over deleted documents, and usesStoredFieldsWriter.startDocument()
,StoredFieldsWriter.writeField(FieldInfo, IndexableField)
, 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:
merge
in classStoredFieldsWriter
- Throws:
IOException
-
ramBytesUsed
public long ramBytesUsed()Description copied from interface:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.
-