mirror of https://github.com/apache/lucene.git
fix more naming
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1435181 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
69c6779625
commit
b931c1f43a
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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);
|
|
@ -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";
|
|
@ -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<Integer,NumericEntry> numerics;
|
||||
private final Map<Integer,BinaryEntry> binaries;
|
||||
|
@ -64,15 +64,15 @@ class Lucene41SimpleDocValuesProducer extends DocValuesProducer {
|
|||
private final Map<Integer,FST<Long>> fstInstances =
|
||||
new HashMap<Integer,FST<Long>>();
|
||||
|
||||
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<Integer,NumericEntry>();
|
||||
binaries = new HashMap<Integer,BinaryEntry>();
|
||||
fsts = new HashMap<Integer,FSTEntry>();
|
||||
|
@ -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();
|
|
@ -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";
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue