LUCENE-3622: move 4.0 IndexDocValues impl classes underneath Lucene40Codec

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene3622@1211242 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2011-12-07 00:21:20 +00:00
parent c649d9a977
commit 249f3c2ee9
21 changed files with 80 additions and 48 deletions

View File

@ -23,7 +23,6 @@ import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.MergeState; import org.apache.lucene.index.MergeState;
import org.apache.lucene.index.values.IndexDocValues; import org.apache.lucene.index.values.IndexDocValues;
import org.apache.lucene.index.values.PerDocFieldValues; import org.apache.lucene.index.values.PerDocFieldValues;
import org.apache.lucene.index.values.Writer;
import org.apache.lucene.util.Bits; import org.apache.lucene.util.Bits;
import org.apache.lucene.util.Counter; import org.apache.lucene.util.Counter;
@ -106,7 +105,7 @@ public abstract class DocValuesConsumer {
final org.apache.lucene.index.MergeState.IndexReaderAndLiveDocs reader = mergeState.readers.get(readerIDX); final org.apache.lucene.index.MergeState.IndexReaderAndLiveDocs reader = mergeState.readers.get(readerIDX);
if (docValues[readerIDX] != null) { if (docValues[readerIDX] != null) {
hasMerged = true; hasMerged = true;
merge(new Writer.SingleSubMergeState(docValues[readerIDX], mergeState.docBase[readerIDX], reader.reader.maxDoc(), merge(new SingleSubMergeState(docValues[readerIDX], mergeState.docBase[readerIDX], reader.reader.maxDoc(),
reader.liveDocs)); reader.liveDocs));
} }
} }

View File

@ -26,10 +26,10 @@ import java.util.TreeMap;
import org.apache.lucene.index.FieldInfo; import org.apache.lucene.index.FieldInfo;
import org.apache.lucene.index.FieldInfos; import org.apache.lucene.index.FieldInfos;
import org.apache.lucene.index.values.Bytes; import org.apache.lucene.index.codecs.lucene40.values.Bytes;
import org.apache.lucene.index.values.Floats; import org.apache.lucene.index.codecs.lucene40.values.Floats;
import org.apache.lucene.index.codecs.lucene40.values.Ints;
import org.apache.lucene.index.values.IndexDocValues; import org.apache.lucene.index.values.IndexDocValues;
import org.apache.lucene.index.values.Ints;
import org.apache.lucene.index.values.ValueType; import org.apache.lucene.index.values.ValueType;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext; import org.apache.lucene.store.IOContext;

View File

@ -22,7 +22,7 @@ import java.util.Comparator;
import org.apache.lucene.index.FieldInfo; import org.apache.lucene.index.FieldInfo;
import org.apache.lucene.index.PerDocWriteState; import org.apache.lucene.index.PerDocWriteState;
import org.apache.lucene.index.values.Writer; import org.apache.lucene.index.codecs.lucene40.values.Writer;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext; import org.apache.lucene.store.IOContext;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;

View File

@ -1,4 +1,4 @@
package org.apache.lucene.index.values; package org.apache.lucene.index.codecs.lucene40.values;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -24,6 +24,9 @@ import java.util.Comparator;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import org.apache.lucene.index.IndexFileNames; import org.apache.lucene.index.IndexFileNames;
import org.apache.lucene.index.values.IndexDocValues;
import org.apache.lucene.index.values.PerDocFieldValues;
import org.apache.lucene.index.values.ValueType;
import org.apache.lucene.index.values.IndexDocValues.SortedSource; import org.apache.lucene.index.values.IndexDocValues.SortedSource;
import org.apache.lucene.index.values.IndexDocValues.Source; import org.apache.lucene.index.values.IndexDocValues.Source;
import org.apache.lucene.store.DataOutput; import org.apache.lucene.store.DataOutput;

View File

@ -1,4 +1,4 @@
package org.apache.lucene.index.values; package org.apache.lucene.index.codecs.lucene40.values;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -25,7 +25,7 @@ import org.apache.lucene.util.BytesRef;
* *
* @lucene.internal * @lucene.internal
*/ */
final class BytesRefUtils { public final class BytesRefUtils {
private BytesRefUtils() { private BytesRefUtils() {
} }

View File

@ -1,4 +1,4 @@
package org.apache.lucene.index.values; package org.apache.lucene.index.codecs.lucene40.values;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -19,9 +19,11 @@ package org.apache.lucene.index.values;
import java.io.IOException; import java.io.IOException;
import org.apache.lucene.index.values.Bytes.BytesReaderBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesReaderBase;
import org.apache.lucene.index.values.Bytes.BytesSourceBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesSourceBase;
import org.apache.lucene.index.values.Bytes.DerefBytesWriterBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.DerefBytesWriterBase;
import org.apache.lucene.index.values.DirectSource;
import org.apache.lucene.index.values.ValueType;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext; import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.IndexInput; import org.apache.lucene.store.IndexInput;

View File

@ -1,4 +1,4 @@
package org.apache.lucene.index.values; package org.apache.lucene.index.codecs.lucene40.values;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -22,12 +22,14 @@ import java.util.Comparator;
import java.util.List; import java.util.List;
import org.apache.lucene.index.MergeState; import org.apache.lucene.index.MergeState;
import org.apache.lucene.index.values.Bytes.BytesReaderBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesReaderBase;
import org.apache.lucene.index.values.Bytes.BytesSortedSourceBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesSortedSourceBase;
import org.apache.lucene.index.values.Bytes.DerefBytesWriterBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.DerefBytesWriterBase;
import org.apache.lucene.index.codecs.lucene40.values.SortedBytesMergeUtils.MergeContext;
import org.apache.lucene.index.codecs.lucene40.values.SortedBytesMergeUtils.SortedSourceSlice;
import org.apache.lucene.index.values.IndexDocValues;
import org.apache.lucene.index.values.ValueType;
import org.apache.lucene.index.values.IndexDocValues.SortedSource; import org.apache.lucene.index.values.IndexDocValues.SortedSource;
import org.apache.lucene.index.values.SortedBytesMergeUtils.MergeContext;
import org.apache.lucene.index.values.SortedBytesMergeUtils.SortedSourceSlice;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext; import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.IndexInput; import org.apache.lucene.store.IndexInput;

View File

@ -1,4 +1,4 @@
package org.apache.lucene.index.values; package org.apache.lucene.index.codecs.lucene40.values;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -21,10 +21,12 @@ import static org.apache.lucene.util.ByteBlockPool.BYTE_BLOCK_SIZE;
import java.io.IOException; import java.io.IOException;
import org.apache.lucene.index.values.Bytes.BytesSourceBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesReaderBase;
import org.apache.lucene.index.values.Bytes.BytesReaderBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesSourceBase;
import org.apache.lucene.index.values.Bytes.BytesWriterBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesWriterBase;
import org.apache.lucene.index.values.DirectSource; import org.apache.lucene.index.values.DirectSource;
import org.apache.lucene.index.values.IndexDocValues;
import org.apache.lucene.index.values.ValueType;
import org.apache.lucene.index.values.IndexDocValues.Source; import org.apache.lucene.index.values.IndexDocValues.Source;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext; import org.apache.lucene.store.IOContext;

View File

@ -1,4 +1,4 @@
package org.apache.lucene.index.values; package org.apache.lucene.index.codecs.lucene40.values;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -18,6 +18,9 @@ package org.apache.lucene.index.values;
*/ */
import java.io.IOException; import java.io.IOException;
import org.apache.lucene.index.values.IndexDocValues;
import org.apache.lucene.index.values.PerDocFieldValues;
import org.apache.lucene.index.values.ValueType;
import org.apache.lucene.index.values.IndexDocValues.Source; import org.apache.lucene.index.values.IndexDocValues.Source;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext; import org.apache.lucene.store.IOContext;

View File

@ -1,10 +1,11 @@
package org.apache.lucene.index.values; package org.apache.lucene.index.codecs.lucene40.values;
import java.io.IOException; import java.io.IOException;
import java.util.Collections; import java.util.Collections;
import java.util.EnumMap; import java.util.EnumMap;
import java.util.Map; import java.util.Map;
import org.apache.lucene.index.values.ValueType;
import org.apache.lucene.index.values.IndexDocValues.Source; import org.apache.lucene.index.values.IndexDocValues.Source;
import org.apache.lucene.store.IndexInput; import org.apache.lucene.store.IndexInput;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;

View File

@ -1,4 +1,4 @@
package org.apache.lucene.index.values; package org.apache.lucene.index.codecs.lucene40.values;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -19,6 +19,9 @@ package org.apache.lucene.index.values;
import java.io.IOException; import java.io.IOException;
import org.apache.lucene.index.values.IndexDocValues;
import org.apache.lucene.index.values.PerDocFieldValues;
import org.apache.lucene.index.values.ValueType;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext; import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.IndexInput; import org.apache.lucene.store.IndexInput;

View File

@ -1,4 +1,4 @@
package org.apache.lucene.index.values; package org.apache.lucene.index.codecs.lucene40.values;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -19,9 +19,12 @@ package org.apache.lucene.index.values;
import java.io.IOException; import java.io.IOException;
import org.apache.lucene.index.IndexFileNames; import org.apache.lucene.index.IndexFileNames;
import org.apache.lucene.index.values.FixedStraightBytesImpl.FixedBytesWriterBase; import org.apache.lucene.index.codecs.lucene40.values.FixedStraightBytesImpl.FixedBytesWriterBase;
import org.apache.lucene.index.codecs.lucene40.values.IndexDocValuesArray.LongValues;
import org.apache.lucene.index.values.IndexDocValues;
import org.apache.lucene.index.values.PerDocFieldValues;
import org.apache.lucene.index.values.ValueType;
import org.apache.lucene.index.values.IndexDocValues.Source; import org.apache.lucene.index.values.IndexDocValues.Source;
import org.apache.lucene.index.values.IndexDocValuesArray.LongValues;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext; import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.IndexInput; import org.apache.lucene.store.IndexInput;

View File

@ -1,4 +1,4 @@
package org.apache.lucene.index.values; package org.apache.lucene.index.codecs.lucene40.values;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -24,6 +24,8 @@ import java.util.List;
import org.apache.lucene.index.MergeState; import org.apache.lucene.index.MergeState;
import org.apache.lucene.index.MergeState.IndexReaderAndLiveDocs; import org.apache.lucene.index.MergeState.IndexReaderAndLiveDocs;
import org.apache.lucene.index.values.IndexDocValues;
import org.apache.lucene.index.values.ValueType;
import org.apache.lucene.index.values.IndexDocValues.SortedSource; import org.apache.lucene.index.values.IndexDocValues.SortedSource;
import org.apache.lucene.index.values.IndexDocValues.Source; import org.apache.lucene.index.values.IndexDocValues.Source;
import org.apache.lucene.store.IndexOutput; import org.apache.lucene.store.IndexOutput;

View File

@ -1,4 +1,4 @@
package org.apache.lucene.index.values; package org.apache.lucene.index.codecs.lucene40.values;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -19,9 +19,11 @@ package org.apache.lucene.index.values;
import java.io.IOException; import java.io.IOException;
import org.apache.lucene.index.values.Bytes.BytesReaderBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesReaderBase;
import org.apache.lucene.index.values.Bytes.BytesSourceBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesSourceBase;
import org.apache.lucene.index.values.Bytes.DerefBytesWriterBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.DerefBytesWriterBase;
import org.apache.lucene.index.values.DirectSource;
import org.apache.lucene.index.values.ValueType;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext; import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.IndexInput; import org.apache.lucene.store.IndexInput;

View File

@ -1,4 +1,4 @@
package org.apache.lucene.index.values; package org.apache.lucene.index.codecs.lucene40.values;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -22,12 +22,14 @@ import java.util.Comparator;
import java.util.List; import java.util.List;
import org.apache.lucene.index.MergeState; import org.apache.lucene.index.MergeState;
import org.apache.lucene.index.values.Bytes.BytesSortedSourceBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesReaderBase;
import org.apache.lucene.index.values.Bytes.BytesReaderBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesSortedSourceBase;
import org.apache.lucene.index.values.Bytes.DerefBytesWriterBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.DerefBytesWriterBase;
import org.apache.lucene.index.codecs.lucene40.values.SortedBytesMergeUtils.MergeContext;
import org.apache.lucene.index.codecs.lucene40.values.SortedBytesMergeUtils.SortedSourceSlice;
import org.apache.lucene.index.values.IndexDocValues;
import org.apache.lucene.index.values.ValueType;
import org.apache.lucene.index.values.IndexDocValues.SortedSource; import org.apache.lucene.index.values.IndexDocValues.SortedSource;
import org.apache.lucene.index.values.SortedBytesMergeUtils.MergeContext;
import org.apache.lucene.index.values.SortedBytesMergeUtils.SortedSourceSlice;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext; import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.IndexInput; import org.apache.lucene.store.IndexInput;

View File

@ -1,4 +1,4 @@
package org.apache.lucene.index.values; package org.apache.lucene.index.codecs.lucene40.values;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -19,9 +19,11 @@ package org.apache.lucene.index.values;
import java.io.IOException; import java.io.IOException;
import org.apache.lucene.index.values.Bytes.BytesReaderBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesReaderBase;
import org.apache.lucene.index.values.Bytes.BytesSourceBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesSourceBase;
import org.apache.lucene.index.values.Bytes.BytesWriterBase; import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesWriterBase;
import org.apache.lucene.index.values.DirectSource;
import org.apache.lucene.index.values.ValueType;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext; import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.IndexInput; import org.apache.lucene.store.IndexInput;

View File

@ -1,4 +1,4 @@
package org.apache.lucene.index.values; package org.apache.lucene.index.codecs.lucene40.values;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -20,6 +20,7 @@ import java.io.IOException;
import java.util.Comparator; import java.util.Comparator;
import org.apache.lucene.index.codecs.DocValuesConsumer; import org.apache.lucene.index.codecs.DocValuesConsumer;
import org.apache.lucene.index.values.ValueType;
import org.apache.lucene.index.values.IndexDocValues.Source; import org.apache.lucene.index.values.IndexDocValues.Source;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext; import org.apache.lucene.store.IOContext;

View File

@ -26,7 +26,7 @@ import org.apache.lucene.index.IndexFileNames;
import org.apache.lucene.index.PerDocWriteState; import org.apache.lucene.index.PerDocWriteState;
import org.apache.lucene.index.SegmentInfo; import org.apache.lucene.index.SegmentInfo;
import org.apache.lucene.index.codecs.DocValuesWriterBase; import org.apache.lucene.index.codecs.DocValuesWriterBase;
import org.apache.lucene.index.values.Writer; import org.apache.lucene.index.codecs.lucene40.values.Writer;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
/** /**

View File

@ -27,13 +27,13 @@ import org.apache.lucene.util.BytesRef;
* Base class for disk resident source implementations * Base class for disk resident source implementations
* @lucene.internal * @lucene.internal
*/ */
abstract class DirectSource extends Source { public abstract class DirectSource extends Source {
protected final IndexInput data; protected final IndexInput data;
private final ToNumeric toNumeric; private final ToNumeric toNumeric;
protected final long baseOffset; protected final long baseOffset;
DirectSource(IndexInput input, ValueType type) { public DirectSource(IndexInput input, ValueType type) {
super(type); super(type);
this.data = input; this.data = input;
baseOffset = input.getFilePointer(); baseOffset = input.getFilePointer();

View File

@ -20,6 +20,10 @@ package org.apache.lucene.index.values;
import java.io.IOException; import java.io.IOException;
import java.util.Comparator; import java.util.Comparator;
import org.apache.lucene.index.codecs.lucene40.values.Bytes;
import org.apache.lucene.index.codecs.lucene40.values.Floats;
import org.apache.lucene.index.codecs.lucene40.values.Ints;
import org.apache.lucene.index.codecs.lucene40.values.Writer;
import org.apache.lucene.index.values.IndexDocValues.SortedSource; import org.apache.lucene.index.values.IndexDocValues.SortedSource;
import org.apache.lucene.index.values.IndexDocValues.Source; import org.apache.lucene.index.values.IndexDocValues.Source;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;

View File

@ -16,6 +16,7 @@ import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.IndexWriterConfig; import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.index.NoMergePolicy; import org.apache.lucene.index.NoMergePolicy;
import org.apache.lucene.index.codecs.Codec; import org.apache.lucene.index.codecs.Codec;
import org.apache.lucene.index.codecs.lucene40.values.BytesRefUtils;
import org.apache.lucene.index.values.IndexDocValues.Source; import org.apache.lucene.index.values.IndexDocValues.Source;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;