Class SimpleTextTermVectorsWriter
- java.lang.Object
-
- org.apache.lucene.codecs.TermVectorsWriter
-
- org.apache.lucene.codecs.simpletext.SimpleTextTermVectorsWriter
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class SimpleTextTermVectorsWriter extends TermVectorsWriter
Writes plain-text term vectors.FOR RECREATIONAL USE ONLY
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description SimpleTextTermVectorsWriter(Directory directory, String segment, IOContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPosition(int position, int startOffset, int endOffset, BytesRef payload)voidclose()voidfinish(FieldInfos fis, int numDocs)voidstartDocument(int numVectorFields)voidstartField(FieldInfo info, int numTerms, boolean positions, boolean offsets, boolean payloads)voidstartTerm(BytesRef term, int freq)-
Methods inherited from class org.apache.lucene.codecs.TermVectorsWriter
addAllDocVectors, addProx, finishDocument, finishField, finishTerm, merge
-
-
-
-
Constructor Detail
-
SimpleTextTermVectorsWriter
public SimpleTextTermVectorsWriter(Directory directory, String segment, IOContext context) throws IOException
- Throws:
IOException
-
-
Method Detail
-
startDocument
public void startDocument(int numVectorFields) throws IOException- Specified by:
startDocumentin classTermVectorsWriter- Throws:
IOException
-
startField
public void startField(FieldInfo info, int numTerms, boolean positions, boolean offsets, boolean payloads) throws IOException
- Specified by:
startFieldin classTermVectorsWriter- Throws:
IOException
-
startTerm
public void startTerm(BytesRef term, int freq) throws IOException
- Specified by:
startTermin classTermVectorsWriter- Throws:
IOException
-
addPosition
public void addPosition(int position, int startOffset, int endOffset, BytesRef payload) throws IOException- Specified by:
addPositionin classTermVectorsWriter- Throws:
IOException
-
finish
public void finish(FieldInfos fis, int numDocs) throws IOException
- Specified by:
finishin classTermVectorsWriter- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classTermVectorsWriter- Throws:
IOException
-
-