TermVectorsWriter
Codec API for writing term vectors:
For every document, .startDocument is called, informing the Codec how many fields will be written.
.startField is called for each field in the document, informing the codec how many terms will be written for that field, and whether or not positions, offsets, or payloads are enabled.
Within each field, .startTerm is called for each term.
If offsets and/or positions are enabled, then .addPosition will be called for each term occurrence.
After all documents have been written, .finish is called for verification/sanity-checks.
Finally the writer is closed (.close)
Inheritors
Properties
Functions
Adds a term position and offsets
Called after a doc and all its fields have been added.
Called after a field and all its terms have been added.
Called after a term and all its positions have been added.
Merges in the term vectors from the readers in mergeState. The default implementation skips over deleted documents, and uses .startDocument, .startField, .startTerm, .addPosition, and .finish, returning the number of documents that were written. Implementations can override this method for more sophisticated merging (bulk-byte copying, etc).
Return the memory usage of this object in bytes. Negative values are illegal.
Called before writing the term vectors of the document. .startField will be called numVectorFields times. Note that if term vectors are enabled, this is called even if the document has no vector fields, in this case numVectorFields will be zero.