From b931c1f43aea832af3927e1e815a46769357ad4e Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Fri, 18 Jan 2013 15:13:54 +0000 Subject: [PATCH] fix more naming git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1435181 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/codecs/lucene40/Lucene40Codec.java | 4 ++-- .../lucene/codecs/lucene41/Lucene41Codec.java | 2 +- ...mer.java => Lucene41DocValuesConsumer.java} | 4 ++-- ...ormat.java => Lucene41DocValuesFormat.java} | 8 ++++---- ...cer.java => Lucene41DocValuesProducer.java} | 18 +++++++++--------- ...rmsFormat.java => Lucene41NormsFormat.java} | 6 +++--- .../org.apache.lucene.codecs.DocValuesFormat | 2 +- 7 files changed, 22 insertions(+), 22 deletions(-) rename lucene/core/src/java/org/apache/lucene/codecs/lucene41/{Lucene41SimpleDocValuesConsumer.java => Lucene41DocValuesConsumer.java} (97%) rename lucene/core/src/java/org/apache/lucene/codecs/lucene41/{Lucene41SimpleDocValuesFormat.java => Lucene41DocValuesFormat.java} (82%) rename lucene/core/src/java/org/apache/lucene/codecs/lucene41/{Lucene41SimpleDocValuesProducer.java => Lucene41DocValuesProducer.java} (92%) rename lucene/core/src/java/org/apache/lucene/codecs/lucene41/{Lucene41SimpleNormsFormat.java => Lucene41NormsFormat.java} (84%) diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40Codec.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40Codec.java index 46a602b18fe..b893558745e 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40Codec.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40Codec.java @@ -27,7 +27,7 @@ import org.apache.lucene.codecs.DocValuesFormat; import org.apache.lucene.codecs.NormsFormat; import org.apache.lucene.codecs.StoredFieldsFormat; import org.apache.lucene.codecs.TermVectorsFormat; -import org.apache.lucene.codecs.lucene41.Lucene41SimpleNormsFormat; +import org.apache.lucene.codecs.lucene41.Lucene41NormsFormat; import org.apache.lucene.codecs.perfield.PerFieldPostingsFormat; /** @@ -97,7 +97,7 @@ public final class Lucene40Codec extends Codec { } // nocommit need a read-only Lucene40SimpleNormsFormat: - private final NormsFormat simpleNormsFormat = new Lucene41SimpleNormsFormat(); + private final NormsFormat simpleNormsFormat = new Lucene41NormsFormat(); @Override public NormsFormat normsFormat() { diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41Codec.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41Codec.java index ebf3aaab93c..81fd38d8d01 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41Codec.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41Codec.java @@ -130,7 +130,7 @@ public class Lucene41Codec extends Codec { // nocommit private final DocValuesFormat defaultDVFormat = DocValuesFormat.forName("Lucene41"); - private final NormsFormat simpleNormsFormat = new Lucene41SimpleNormsFormat(); + private final NormsFormat simpleNormsFormat = new Lucene41NormsFormat(); @Override public NormsFormat normsFormat() { diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41SimpleDocValuesConsumer.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41DocValuesConsumer.java similarity index 97% rename from lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41SimpleDocValuesConsumer.java rename to lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41DocValuesConsumer.java index 533c9cf6e73..e992e328b24 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41SimpleDocValuesConsumer.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41DocValuesConsumer.java @@ -47,7 +47,7 @@ import org.apache.lucene.util.packed.PackedInts.FormatAndBits; * the latter is typically much smaller with lucene's sims, as only some byte values are used, * but its often a nonlinear mapping, especially if you dont use crazy boosts. */ -class Lucene41SimpleDocValuesConsumer extends DocValuesConsumer { +class Lucene41DocValuesConsumer extends DocValuesConsumer { static final int VERSION_START = 0; static final int VERSION_CURRENT = VERSION_START; @@ -57,7 +57,7 @@ class Lucene41SimpleDocValuesConsumer extends DocValuesConsumer { final IndexOutput data, meta; - Lucene41SimpleDocValuesConsumer(SegmentWriteState state, String dataCodec, String dataExtension, String metaCodec, String metaExtension) throws IOException { + Lucene41DocValuesConsumer(SegmentWriteState state, String dataCodec, String dataExtension, String metaCodec, String metaExtension) throws IOException { boolean success = false; try { String dataName = IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, dataExtension); diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41SimpleDocValuesFormat.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41DocValuesFormat.java similarity index 82% rename from lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41SimpleDocValuesFormat.java rename to lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41DocValuesFormat.java index f444d41a7a7..8556ed66dca 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41SimpleDocValuesFormat.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41DocValuesFormat.java @@ -25,20 +25,20 @@ import org.apache.lucene.codecs.DocValuesFormat; import org.apache.lucene.index.SegmentReadState; import org.apache.lucene.index.SegmentWriteState; -public class Lucene41SimpleDocValuesFormat extends DocValuesFormat { +public class Lucene41DocValuesFormat extends DocValuesFormat { - public Lucene41SimpleDocValuesFormat() { + public Lucene41DocValuesFormat() { super("Lucene41"); } @Override public DocValuesConsumer fieldsConsumer(SegmentWriteState state) throws IOException { - return new Lucene41SimpleDocValuesConsumer(state, DATA_CODEC, DATA_EXTENSION, METADATA_CODEC, METADATA_EXTENSION); + return new Lucene41DocValuesConsumer(state, DATA_CODEC, DATA_EXTENSION, METADATA_CODEC, METADATA_EXTENSION); } @Override public DocValuesProducer fieldsProducer(SegmentReadState state) throws IOException { - return new Lucene41SimpleDocValuesProducer(state, DATA_CODEC, DATA_EXTENSION, METADATA_CODEC, METADATA_EXTENSION); + return new Lucene41DocValuesProducer(state, DATA_CODEC, DATA_EXTENSION, METADATA_CODEC, METADATA_EXTENSION); } private static final String DATA_CODEC = "Lucene41DocValuesData"; diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41SimpleDocValuesProducer.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41DocValuesProducer.java similarity index 92% rename from lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41SimpleDocValuesProducer.java rename to lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41DocValuesProducer.java index 6af61967beb..795d8701911 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41SimpleDocValuesProducer.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41DocValuesProducer.java @@ -45,7 +45,7 @@ import org.apache.lucene.util.fst.PositiveIntOutputs; import org.apache.lucene.util.fst.Util; import org.apache.lucene.util.packed.PackedInts; -class Lucene41SimpleDocValuesProducer extends DocValuesProducer { +class Lucene41DocValuesProducer extends DocValuesProducer { // metadata maps (just file pointers and minimal stuff) private final Map numerics; private final Map binaries; @@ -64,15 +64,15 @@ class Lucene41SimpleDocValuesProducer extends DocValuesProducer { private final Map> fstInstances = new HashMap>(); - Lucene41SimpleDocValuesProducer(SegmentReadState state, String dataCodec, String dataExtension, String metaCodec, String metaExtension) throws IOException { + Lucene41DocValuesProducer(SegmentReadState state, String dataCodec, String dataExtension, String metaCodec, String metaExtension) throws IOException { String metaName = IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, metaExtension); // read in the entries from the metadata file. IndexInput in = state.directory.openInput(metaName, state.context); boolean success = false; try { CodecUtil.checkHeader(in, metaCodec, - Lucene41SimpleDocValuesConsumer.VERSION_START, - Lucene41SimpleDocValuesConsumer.VERSION_START); + Lucene41DocValuesConsumer.VERSION_START, + Lucene41DocValuesConsumer.VERSION_START); numerics = new HashMap(); binaries = new HashMap(); fsts = new HashMap(); @@ -89,27 +89,27 @@ class Lucene41SimpleDocValuesProducer extends DocValuesProducer { String dataName = IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, dataExtension); data = state.directory.openInput(dataName, state.context); CodecUtil.checkHeader(data, dataCodec, - Lucene41SimpleDocValuesConsumer.VERSION_START, - Lucene41SimpleDocValuesConsumer.VERSION_START); + Lucene41DocValuesConsumer.VERSION_START, + Lucene41DocValuesConsumer.VERSION_START); } private void readFields(IndexInput meta, FieldInfos infos) throws IOException { int fieldNumber = meta.readVInt(); while (fieldNumber != -1) { int fieldType = meta.readByte(); - if (fieldType == Lucene41SimpleDocValuesConsumer.NUMBER) { + if (fieldType == Lucene41DocValuesConsumer.NUMBER) { NumericEntry entry = new NumericEntry(); entry.offset = meta.readLong(); entry.tableized = meta.readByte() != 0; numerics.put(fieldNumber, entry); - } else if (fieldType == Lucene41SimpleDocValuesConsumer.BYTES) { + } else if (fieldType == Lucene41DocValuesConsumer.BYTES) { BinaryEntry entry = new BinaryEntry(); entry.offset = meta.readLong(); entry.numBytes = meta.readLong(); entry.minLength = meta.readVInt(); entry.maxLength = meta.readVInt(); binaries.put(fieldNumber, entry); - } else if (fieldType == Lucene41SimpleDocValuesConsumer.FST) { + } else if (fieldType == Lucene41DocValuesConsumer.FST) { FSTEntry entry = new FSTEntry(); entry.offset = meta.readLong(); entry.numOrds = meta.readVInt(); diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41SimpleNormsFormat.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41NormsFormat.java similarity index 84% rename from lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41SimpleNormsFormat.java rename to lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41NormsFormat.java index c81eee29b90..812204ad140 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41SimpleNormsFormat.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41NormsFormat.java @@ -25,16 +25,16 @@ import org.apache.lucene.codecs.NormsFormat; import org.apache.lucene.index.SegmentReadState; import org.apache.lucene.index.SegmentWriteState; -public class Lucene41SimpleNormsFormat extends NormsFormat { +public class Lucene41NormsFormat extends NormsFormat { @Override public DocValuesConsumer normsConsumer(SegmentWriteState state) throws IOException { - return new Lucene41SimpleDocValuesConsumer(state, DATA_CODEC, DATA_EXTENSION, METADATA_CODEC, METADATA_EXTENSION); + return new Lucene41DocValuesConsumer(state, DATA_CODEC, DATA_EXTENSION, METADATA_CODEC, METADATA_EXTENSION); } @Override public DocValuesProducer normsProducer(SegmentReadState state) throws IOException { - return new Lucene41SimpleDocValuesProducer(state, DATA_CODEC, DATA_EXTENSION, METADATA_CODEC, METADATA_EXTENSION); + return new Lucene41DocValuesProducer(state, DATA_CODEC, DATA_EXTENSION, METADATA_CODEC, METADATA_EXTENSION); } private static final String DATA_CODEC = "Lucene41NormsData"; diff --git a/lucene/core/src/resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat b/lucene/core/src/resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat index c5e93afa6fc..ddb5385abf1 100644 --- a/lucene/core/src/resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat +++ b/lucene/core/src/resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -org.apache.lucene.codecs.lucene41.Lucene41SimpleDocValuesFormat +org.apache.lucene.codecs.lucene41.Lucene41DocValuesFormat