From 300ee913776c5c4393114ac2c332e947df13c0e5 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Wed, 22 Oct 2014 12:41:43 +0000 Subject: [PATCH] LUCENE-5969: tidy up format names to be consistent, add missing file formats doc git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene5969@1633607 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/codecs/blocktree/BlockTreeTermsReader.java | 4 ++-- .../lucene/codecs/lucene50/Lucene50DocValuesFormat.java | 2 +- .../src/java/org/apache/lucene/index/SegmentInfos.java | 9 +++++++-- .../codecs/idversion/VersionBlockTreeTermsWriter.java | 4 ++-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/codecs/blocktree/BlockTreeTermsReader.java b/lucene/core/src/java/org/apache/lucene/codecs/blocktree/BlockTreeTermsReader.java index c1d43eb57a5..e01288eccbe 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/blocktree/BlockTreeTermsReader.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/blocktree/BlockTreeTermsReader.java @@ -84,7 +84,7 @@ public final class BlockTreeTermsReader extends FieldsProducer { /** Extension of terms file */ static final String TERMS_EXTENSION = "tim"; - final static String TERMS_CODEC_NAME = "BLOCK_TREE_TERMS_DICT"; + final static String TERMS_CODEC_NAME = "BlockTreeTermsDict"; /** Initial terms format. */ public static final int VERSION_START = 0; @@ -94,7 +94,7 @@ public final class BlockTreeTermsReader extends FieldsProducer { /** Extension of terms index file */ static final String TERMS_INDEX_EXTENSION = "tip"; - final static String TERMS_INDEX_CODEC_NAME = "BLOCK_TREE_TERMS_INDEX"; + final static String TERMS_INDEX_CODEC_NAME = "BlockTreeTermsIndex"; // Open input to the main terms dict file (_X.tib) final IndexInput termsIn; diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50DocValuesFormat.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50DocValuesFormat.java index 7d23482d77a..c5808053260 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50DocValuesFormat.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50DocValuesFormat.java @@ -184,7 +184,7 @@ public final class Lucene50DocValuesFormat extends DocValuesFormat { static final String DATA_CODEC = "Lucene50DocValuesData"; static final String DATA_EXTENSION = "dvd"; - static final String META_CODEC = "Lucene50ValuesMetadata"; + static final String META_CODEC = "Lucene50DocValuesMetadata"; static final String META_EXTENSION = "dvm"; static final int VERSION_START = 0; static final int VERSION_CURRENT = VERSION_START; diff --git a/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java b/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java index cf81147dba5..2210cbfcdc5 100644 --- a/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java +++ b/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java @@ -60,7 +60,7 @@ import org.apache.lucene.util.StringHelper; * Files: * *

@@ -72,6 +72,8 @@ import org.apache.lucene.util.StringHelper; * {@link DataOutput#writeInt Int32} *
  • Generation, Version, DelGen, Checksum, FieldInfosGen, DocValuesGen --> * {@link DataOutput#writeLong Int64}
  • + *
  • HasSegID --> {@link DataOutput#writeByte Int8}
  • + *
  • SegID --> {@link DataOutput#writeByte Int8ID_LENGTH}
  • *
  • SegName, SegCodec --> {@link DataOutput#writeString String}
  • *
  • CommitUserData --> {@link DataOutput#writeStringStringMap * Map<String,String>}
  • @@ -94,7 +96,10 @@ import org.apache.lucene.util.StringHelper; *
  • DeletionCount records the number of deleted documents in this segment.
  • *
  • SegCodec is the {@link Codec#getName() name} of the Codec that encoded * this segment.
  • - *
  • SegID is the id of the Codec that encoded this segment.
  • + *
  • HasSegID is nonzero if the segment has an identifier. Otherwise, when it is 0 + * the identifier is {@code null} and no SegID is written. Null only happens for Lucene + * 4.x segments referenced in commits.
  • + *
  • SegID is the identifier of the Codec that encoded this segment.
  • *
  • CommitUserData stores an optional user-supplied opaque * Map<String,String> that was passed to * {@link IndexWriter#setCommitData(java.util.Map)}.
  • diff --git a/lucene/sandbox/src/java/org/apache/lucene/codecs/idversion/VersionBlockTreeTermsWriter.java b/lucene/sandbox/src/java/org/apache/lucene/codecs/idversion/VersionBlockTreeTermsWriter.java index e9971b776f1..a055396cdb7 100644 --- a/lucene/sandbox/src/java/org/apache/lucene/codecs/idversion/VersionBlockTreeTermsWriter.java +++ b/lucene/sandbox/src/java/org/apache/lucene/codecs/idversion/VersionBlockTreeTermsWriter.java @@ -118,7 +118,7 @@ public final class VersionBlockTreeTermsWriter extends FieldsConsumer { /** Extension of terms file */ static final String TERMS_EXTENSION = "tiv"; - final static String TERMS_CODEC_NAME = "VERSION_BLOCK_TREE_TERMS_DICT"; + final static String TERMS_CODEC_NAME = "VersionBlockTreeTermsDict"; /** Initial terms format. */ public static final int VERSION_START = 1; @@ -128,7 +128,7 @@ public final class VersionBlockTreeTermsWriter extends FieldsConsumer { /** Extension of terms index file */ static final String TERMS_INDEX_EXTENSION = "tipv"; - final static String TERMS_INDEX_CODEC_NAME = "VERSION_BLOCK_TREE_TERMS_INDEX"; + final static String TERMS_INDEX_CODEC_NAME = "VersionBlockTreeTermsIndex"; private final IndexOutput out; private final IndexOutput indexOut;