diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfosFormat.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfosFormat.java index b4783b3d214..4852bbbc73d 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfosFormat.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfosFormat.java @@ -1,17 +1,5 @@ package org.apache.lucene.codecs.lucene40; -import org.apache.lucene.codecs.Codec; // javadocs -import org.apache.lucene.codecs.LiveDocsFormat; // javadocs -import org.apache.lucene.codecs.SegmentInfosFormat; -import org.apache.lucene.codecs.SegmentInfosReader; -import org.apache.lucene.codecs.SegmentInfosWriter; -import org.apache.lucene.codecs.StoredFieldsFormat; // javadocs -import org.apache.lucene.codecs.TermVectorsFormat; // javadocs -import org.apache.lucene.index.FieldInfo.IndexOptions; // javadocs -import org.apache.lucene.index.IndexWriter; // javadocs -import org.apache.lucene.index.SegmentInfos; // javadocs -import org.apache.lucene.store.DataOutput; // javadocs - /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -29,6 +17,18 @@ import org.apache.lucene.store.DataOutput; // javadocs * limitations under the License. */ +import org.apache.lucene.codecs.Codec; // javadocs +import org.apache.lucene.codecs.LiveDocsFormat; // javadocs +import org.apache.lucene.codecs.SegmentInfosFormat; +import org.apache.lucene.codecs.SegmentInfosReader; +import org.apache.lucene.codecs.SegmentInfosWriter; +import org.apache.lucene.codecs.StoredFieldsFormat; // javadocs +import org.apache.lucene.codecs.TermVectorsFormat; // javadocs +import org.apache.lucene.index.FieldInfo.IndexOptions; // javadocs +import org.apache.lucene.index.IndexWriter; // javadocs +import org.apache.lucene.index.SegmentInfos; // javadocs +import org.apache.lucene.store.DataOutput; // javadocs + /** * Lucene 4.0 Segments format. *
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsFormat.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsFormat.java index 8e3f68177e3..b7fc81266e3 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsFormat.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsFormat.java @@ -25,9 +25,81 @@ import org.apache.lucene.codecs.TermVectorsReader; import org.apache.lucene.codecs.TermVectorsWriter; import org.apache.lucene.index.FieldInfos; import org.apache.lucene.index.SegmentInfo; +import org.apache.lucene.store.DataOutput; // javadocs import org.apache.lucene.store.Directory; import org.apache.lucene.store.IOContext; +/** + * 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) --> TVXVersion<DocumentPosition,FieldPosition> + * NumDocs
+ *Lucene40TermVectorsReader.FORMAT_CURRENT
)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) --> TVDVersion<NumFields, FieldNums, + * FieldPositions> NumDocs
+ *Lucene40TermVectorsReader.FORMAT_CURRENT
)The 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 and offset + * information.
+ *Field (.tvf) --> TVFVersion<NumTerms, Position/Offset, TermFreqs> + * NumFields
+ *Lucene40TermVectorsReader.FORMAT_CURRENT
)Notes:
+ *