Class Lucene40TermVectorsWriter

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public final class Lucene40TermVectorsWriter
    extends TermVectorsWriter
    Lucene 4.0 Term Vectors writer.

    It writes .tvd, .tvf, and .tvx files.

    See Also:
    Lucene40TermVectorsFormat
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void abort()
      Aborts writing entirely, implementation should remove any partially-written files, etc.
      void addPosition​(int position, int startOffset, int endOffset, BytesRef payload)
      Adds a term position and offsets
      void addProx​(int numProx, DataInput positions, DataInput offsets)
      Called by IndexWriter when writing new segments.
      void close()
      Close all streams.
      void finish​(FieldInfos fis, int numDocs)
      Called before TermVectorsWriter.close(), passing in the number of documents that were written.
      void finishDocument()
      Called after a doc and all its fields have been added.
      void finishTerm()
      Called after a term and all its positions have been added.
      java.util.Comparator<BytesRef> getComparator()
      Return the BytesRef Comparator used to sort terms before feeding to this API.
      int merge​(MergeState mergeState)
      Merges in the term vectors from the readers in mergeState.
      void startDocument​(int numVectorFields)
      Called before writing the term vectors of the document.
      void startField​(FieldInfo info, int numTerms, boolean positions, boolean offsets, boolean payloads)
      Called before writing the terms of the field.
      void startTerm​(BytesRef term, int freq)
      Adds a term and its term frequency freq.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait