|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.codecs.TermVectorsFormat
org.apache.lucene.codecs.lucene40.Lucene40TermVectorsFormat
public class Lucene40TermVectorsFormat
Lucene 4.0 Term Vectors format.
Term Vector support is an optional on a field by field basis. It consists of 3 files.
The Document Index or .tvx file.
For each document, this stores the offset into the document data (.tvd) and field data (.tvf) files.
DocumentIndex (.tvx) --> Header,<DocumentPosition,FieldPosition> NumDocs
CodecHeaderUInt64 (offset in the .tvd file)UInt64 (offset in the .tvf file)The Document or .tvd file.
This contains, for each document, the number of fields, a list of the fields with term vector info and finally a list of pointers to the field information in the .tvf (Term Vector Fields) file.
The .tvd file is used to map out the fields that have term vectors stored and where the field information is in the .tvf file.
Document (.tvd) --> Header,<NumFields, FieldNums, FieldPositions> NumDocs
CodecHeaderVIntVIntVLongThe Field or .tvf file.
This file contains, for each field that has a term vector stored, a list of the terms, their frequencies and, optionally, position, offset, and payload information.
Field (.tvf) --> Header,<NumTerms, Flags, TermFreqs> NumFields
CodecHeaderVIntByteVIntStringVIntVIntVIntByteNumPayloadBytesVInt, VInt>TermFreqNotes:
| Constructor Summary | |
|---|---|
Lucene40TermVectorsFormat()
Sole constructor. |
|
| Method Summary | |
|---|---|
TermVectorsReader |
vectorsReader(Directory directory,
SegmentInfo segmentInfo,
FieldInfos fieldInfos,
IOContext context)
Returns a TermVectorsReader to read term
vectors. |
TermVectorsWriter |
vectorsWriter(Directory directory,
SegmentInfo segmentInfo,
IOContext context)
Returns a TermVectorsWriter to write term
vectors. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Lucene40TermVectorsFormat()
| Method Detail |
|---|
public TermVectorsReader vectorsReader(Directory directory,
SegmentInfo segmentInfo,
FieldInfos fieldInfos,
IOContext context)
throws IOException
TermVectorsFormatTermVectorsReader to read term
vectors.
vectorsReader in class TermVectorsFormatIOException
public TermVectorsWriter vectorsWriter(Directory directory,
SegmentInfo segmentInfo,
IOContext context)
throws IOException
TermVectorsFormatTermVectorsWriter to write term
vectors.
vectorsWriter in class TermVectorsFormatIOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||