Class SimpleTextTermVectorsWriter
java.lang.Object
org.apache.lucene.codecs.TermVectorsWriter
org.apache.lucene.codecs.simpletext.SimpleTextTermVectorsWriter
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Accountable
Writes plain-text term vectors.
FOR RECREATIONAL USE ONLY
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
Constructor Summary
ConstructorDescriptionSimpleTextTermVectorsWriter
(Directory directory, String segment, IOContext context) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPosition
(int position, int startOffset, int endOffset, BytesRef payload) void
close()
void
finish
(int numDocs) long
void
startDocument
(int numVectorFields) void
startField
(FieldInfo info, int numTerms, boolean positions, boolean offsets, boolean payloads) void
Methods inherited from class org.apache.lucene.codecs.TermVectorsWriter
addAllDocVectors, addProx, finishDocument, finishField, finishTerm, merge
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
-
Constructor Details
-
SimpleTextTermVectorsWriter
public SimpleTextTermVectorsWriter(Directory directory, String segment, IOContext context) throws IOException - Throws:
IOException
-
-
Method Details
-
startDocument
- Specified by:
startDocument
in classTermVectorsWriter
- Throws:
IOException
-
startField
public void startField(FieldInfo info, int numTerms, boolean positions, boolean offsets, boolean payloads) throws IOException - Specified by:
startField
in classTermVectorsWriter
- Throws:
IOException
-
startTerm
- Specified by:
startTerm
in classTermVectorsWriter
- Throws:
IOException
-
addPosition
public void addPosition(int position, int startOffset, int endOffset, BytesRef payload) throws IOException - Specified by:
addPosition
in classTermVectorsWriter
- Throws:
IOException
-
finish
- Specified by:
finish
in classTermVectorsWriter
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classTermVectorsWriter
- Throws:
IOException
-
ramBytesUsed
public long ramBytesUsed()
-