Class StoredFieldsWriter
Codec API for writing stored fields:
- For every document, StartDocument(Int32) is called, informing the Codec how many fields will be written.
- WriteField(FieldInfo, IIndexableField) is called for each field in the document.
- After all documents have been written, Finish(FieldInfos, Int32) is called for verification/sanity-checks.
- Finally the writer is disposed (Dispose(Boolean))
@lucene.experimental
Inheritance
Assembly: DistributedLucene.Net.dll
Syntax
public abstract class StoredFieldsWriter : IDisposable
Constructors
Name | Description |
---|---|
StoredFieldsWriter() | Sole constructor. (For invocation by subclass constructors, typically implicit.) |
Methods
Name | Description |
---|---|
Abort() | Aborts writing entirely, implementation should remove any partially-written files, etc. |
AddDocument<T1>(IEnumerable<T1>, FieldInfos) | Sugar method for StartDocument(Int32) + WriteField(FieldInfo, IIndexableField) for every stored field in the document. |
Dispose() | Disposes all resources used by this object. |
Dispose(Boolean) | Implementations must override and should dispose all resources used by this instance. |
Finish(FieldInfos, Int32) | Called before Dispose(), passing in the number of documents that were written. Note that this is intentionally redundant (equivalent to the number of calls to StartDocument(Int32), but a Codec should check that this is the case to detect the bug described in LUCENE-1282. |
FinishDocument() | Called when a document and all its fields have been added. |
Merge(MergeState) | Merges in the stored fields from the readers in
|
StartDocument(Int32) | Called before writing the stored fields of the document.
WriteField(FieldInfo, IIndexableField) will be called
|
WriteField(FieldInfo, IIndexableField) | Writes a single stored field. |