lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1212506 [2/4] - in /lucene/dev/branches/lucene3622: lucene/ lucene/contrib/memory/src/java/org/apache/lucene/index/memory/ lucene/contrib/misc/src/java/org/apache/lucene/document/ lucene/src/java/org/apache/lucene/document/ lucene/src/java...
Date Fri, 09 Dec 2011 16:43:48 GMT
Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesConsumer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesConsumer.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesConsumer.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesConsumer.java Fri Dec  9 16:43:45 2011
@@ -18,10 +18,10 @@ package org.apache.lucene.index.codecs;
  */
 import java.io.IOException;
 
+import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.MergeState;
-import org.apache.lucene.index.values.IndexDocValues;
-import org.apache.lucene.index.values.PerDocFieldValues;
+import org.apache.lucene.index.PerDocFieldValues;
 import org.apache.lucene.util.Bits;
 
 /**
@@ -70,11 +70,11 @@ public abstract class DocValuesConsumer 
    *          the state to merge
    * @param docValues docValues array containing one instance per reader (
    *          {@link org.apache.lucene.index.MergeState#readers}) or <code>null</code> if the reader has
-   *          no {@link IndexDocValues} instance.
+   *          no {@link DocValues} instance.
    * @throws IOException
    *           if an {@link IOException} occurs
    */
-  public void merge(MergeState mergeState, IndexDocValues[] docValues) throws IOException {
+  public void merge(MergeState mergeState, DocValues[] docValues) throws IOException {
     assert mergeState != null;
     boolean hasMerged = false;
     for(int readerIDX=0;readerIDX<mergeState.readers.size();readerIDX++) {
@@ -115,7 +115,7 @@ public abstract class DocValuesConsumer 
      * the source reader for this MergeState - merged values should be read from
      * this instance
      */
-    public final IndexDocValues reader;
+    public final DocValues reader;
     /** the absolute docBase for this MergeState within the resulting segment */
     public final int docBase;
     /** the number of documents in this MergeState */
@@ -123,7 +123,7 @@ public abstract class DocValuesConsumer 
     /** the not deleted bits for this MergeState */
     public final Bits liveDocs;
 
-    public SingleSubMergeState(IndexDocValues reader, int docBase, int docCount, Bits liveDocs) {
+    public SingleSubMergeState(DocValues reader, int docBase, int docCount, Bits liveDocs) {
       assert reader != null;
       this.reader = reader;
       this.docBase = docBase;

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesFormat.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesFormat.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesFormat.java Fri Dec  9 16:43:45 2011
@@ -20,6 +20,7 @@ package org.apache.lucene.index.codecs;
 import java.io.IOException;
 import java.util.Set;
 
+import org.apache.lucene.index.PerDocValues;
 import org.apache.lucene.index.PerDocWriteState;
 import org.apache.lucene.index.SegmentInfo;
 import org.apache.lucene.index.SegmentReadState;

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesReaderBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesReaderBase.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesReaderBase.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesReaderBase.java Fri Dec  9 16:43:45 2011
@@ -26,11 +26,12 @@ import java.util.TreeMap;
 
 import org.apache.lucene.index.FieldInfo;
 import org.apache.lucene.index.FieldInfos;
+import org.apache.lucene.index.DocValues;
+import org.apache.lucene.index.DocValues.Type; // javadocs
+import org.apache.lucene.index.PerDocValues;
 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.values.IndexDocValues;
-import org.apache.lucene.index.values.ValueType;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.util.BytesRef;
@@ -39,10 +40,11 @@ import org.apache.lucene.util.BytesRef;
  * Abstract base class for PerDocValues implementations
  * @lucene.experimental
  */
+// TODO: this needs to go under lucene40 codec (its specific to its impl)
 public abstract class DocValuesReaderBase extends PerDocValues {
   
   protected abstract void closeInternal(Collection<? extends Closeable> closeables) throws IOException;
-  protected abstract Map<String, IndexDocValues> docValues();
+  protected abstract Map<String, DocValues> docValues();
   
   @Override
   public void close() throws IOException {
@@ -50,7 +52,7 @@ public abstract class DocValuesReaderBas
   }
   
   @Override
-  public IndexDocValues docValues(String field) throws IOException {
+  public DocValues docValues(String field) throws IOException {
     return docValues().get(field);
   }
   
@@ -59,10 +61,10 @@ public abstract class DocValuesReaderBas
   }
 
   // Only opens files... doesn't actually load any values
-  protected TreeMap<String, IndexDocValues> load(FieldInfos fieldInfos,
+  protected TreeMap<String, DocValues> load(FieldInfos fieldInfos,
       String segment, int docCount, Directory dir, IOContext context)
       throws IOException {
-    TreeMap<String, IndexDocValues> values = new TreeMap<String, IndexDocValues>();
+    TreeMap<String, DocValues> values = new TreeMap<String, DocValues>();
     boolean success = false;
     try {
 
@@ -88,26 +90,26 @@ public abstract class DocValuesReaderBas
   }
   
   /**
-   * Loads a {@link IndexDocValues} instance depending on the given {@link ValueType}.
-   * Codecs that use different implementations for a certain {@link ValueType} can
+   * Loads a {@link DocValues} instance depending on the given {@link Type}.
+   * Codecs that use different implementations for a certain {@link Type} can
    * simply override this method and return their custom implementations.
    * 
    * @param docCount
    *          number of documents in the segment
    * @param dir
-   *          the {@link Directory} to load the {@link IndexDocValues} from
+   *          the {@link Directory} to load the {@link DocValues} from
    * @param id
    *          the unique file ID within the segment
    * @param type
    *          the type to load
-   * @return a {@link IndexDocValues} instance for the given type
+   * @return a {@link DocValues} instance for the given type
    * @throws IOException
    *           if an {@link IOException} occurs
    * @throws IllegalArgumentException
-   *           if the given {@link ValueType} is not supported
+   *           if the given {@link Type} is not supported
    */
-  protected IndexDocValues loadDocValues(int docCount, Directory dir, String id,
-      ValueType type, IOContext context) throws IOException {
+  protected DocValues loadDocValues(int docCount, Directory dir, String id,
+      DocValues.Type type, IOContext context) throws IOException {
     switch (type) {
     case FIXED_INTS_16:
     case FIXED_INTS_32:

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesWriterBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesWriterBase.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesWriterBase.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesWriterBase.java Fri Dec  9 16:43:45 2011
@@ -23,7 +23,7 @@ import java.util.Comparator;
 import org.apache.lucene.index.FieldInfo;
 import org.apache.lucene.index.PerDocWriteState;
 import org.apache.lucene.index.codecs.lucene40.values.Writer;
-import org.apache.lucene.index.values.ValueType;
+import org.apache.lucene.index.DocValues;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.util.BytesRef;
@@ -33,6 +33,7 @@ import org.apache.lucene.util.Counter;
  * Abstract base class for PerDocConsumer implementations
  * @lucene.experimental
  */
+//TODO: this needs to go under lucene40 codec (its specific to its impl)
 public abstract class DocValuesWriterBase extends PerDocConsumer {
   protected final String segmentName;
   protected final String segmentSuffix;
@@ -53,7 +54,7 @@ public abstract class DocValuesWriterBas
   }
 
   @Override
-  public DocValuesConsumer addValuesField(ValueType valueType, FieldInfo field) throws IOException {
+  public DocValuesConsumer addValuesField(DocValues.Type valueType, FieldInfo field) throws IOException {
     return Writer.create(valueType,
         docValuesId(segmentName, field.number), 
         getDirectory(), getComparator(), bytesUsed, context);

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/PerDocConsumer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/PerDocConsumer.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/PerDocConsumer.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/PerDocConsumer.java Fri Dec  9 16:43:45 2011
@@ -19,9 +19,9 @@ import java.io.Closeable;
 import java.io.IOException;
 
 import org.apache.lucene.index.FieldInfo;
+import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.MergeState;
-import org.apache.lucene.index.values.IndexDocValues;
-import org.apache.lucene.index.values.ValueType;
+import org.apache.lucene.index.PerDocValues;
 
 /**
  * Abstract API that consumes per document values. Concrete implementations of
@@ -35,7 +35,7 @@ import org.apache.lucene.index.values.Va
  */
 public abstract class PerDocConsumer implements Closeable{
   /** Adds a new DocValuesField */
-  public abstract DocValuesConsumer addValuesField(ValueType type, FieldInfo field)
+  public abstract DocValuesConsumer addValuesField(DocValues.Type type, FieldInfo field)
       throws IOException;
 
   /**
@@ -43,7 +43,7 @@ public abstract class PerDocConsumer imp
    * into this consumers format.   
    */
   public void merge(MergeState mergeState) throws IOException {
-    final IndexDocValues[] docValues = new IndexDocValues[mergeState.readers.size()];
+    final DocValues[] docValues = new DocValues[mergeState.readers.size()];
     final PerDocValues[] perDocValues = new PerDocValues[mergeState.readers.size()];
     // pull all PerDocValues 
     for (int i = 0; i < perDocValues.length; i++) {

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene3x/Lucene3xCodec.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene3x/Lucene3xCodec.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene3x/Lucene3xCodec.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene3x/Lucene3xCodec.java Fri Dec  9 16:43:45 2011
@@ -20,6 +20,7 @@ package org.apache.lucene.index.codecs.l
 import java.io.IOException;
 import java.util.Set;
 
+import org.apache.lucene.index.PerDocValues;
 import org.apache.lucene.index.PerDocWriteState;
 import org.apache.lucene.index.SegmentInfo;
 import org.apache.lucene.index.SegmentReadState;
@@ -29,7 +30,6 @@ import org.apache.lucene.index.codecs.Fi
 import org.apache.lucene.index.codecs.NormsFormat;
 import org.apache.lucene.index.codecs.StoredFieldsFormat;
 import org.apache.lucene.index.codecs.PerDocConsumer;
-import org.apache.lucene.index.codecs.PerDocValues;
 import org.apache.lucene.index.codecs.PostingsFormat;
 import org.apache.lucene.index.codecs.SegmentInfosFormat;
 import org.apache.lucene.index.codecs.TermVectorsFormat;

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/Lucene40DocValuesFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/Lucene40DocValuesFormat.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/Lucene40DocValuesFormat.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/Lucene40DocValuesFormat.java Fri Dec  9 16:43:45 2011
@@ -20,12 +20,12 @@ package org.apache.lucene.index.codecs.l
 import java.io.IOException;
 import java.util.Set;
 
+import org.apache.lucene.index.PerDocValues;
 import org.apache.lucene.index.PerDocWriteState;
 import org.apache.lucene.index.SegmentInfo;
 import org.apache.lucene.index.SegmentReadState;
 import org.apache.lucene.index.codecs.DocValuesFormat;
 import org.apache.lucene.index.codecs.PerDocConsumer;
-import org.apache.lucene.index.codecs.PerDocValues;
 import org.apache.lucene.store.Directory;
 
 public class Lucene40DocValuesFormat extends DocValuesFormat {

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/Lucene40DocValuesProducer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/Lucene40DocValuesProducer.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/Lucene40DocValuesProducer.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/Lucene40DocValuesProducer.java Fri Dec  9 16:43:45 2011
@@ -24,10 +24,10 @@ import java.util.Collection;
 import java.util.Map;
 import java.util.TreeMap;
 
+import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.IndexFileNames;
 import org.apache.lucene.index.SegmentReadState;
 import org.apache.lucene.index.codecs.DocValuesReaderBase;
-import org.apache.lucene.index.values.IndexDocValues;
 import org.apache.lucene.store.CompoundFileDirectory;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.IOUtils;
@@ -37,12 +37,12 @@ import org.apache.lucene.util.IOUtils;
  * @lucene.experimental
  */
 public class Lucene40DocValuesProducer extends DocValuesReaderBase {
-  protected final TreeMap<String,IndexDocValues> docValues;
+  protected final TreeMap<String,DocValues> docValues;
   private final Directory cfs;
 
   /**
    * Creates a new {@link Lucene40DocValuesProducer} instance and loads all
-   * {@link IndexDocValues} instances for this segment and codec.
+   * {@link DocValues} instances for this segment and codec.
    */
   public Lucene40DocValuesProducer(SegmentReadState state) throws IOException {
     if (state.fieldInfos.anyDocValuesFields()) {
@@ -53,12 +53,12 @@ public class Lucene40DocValuesProducer e
       docValues = load(state.fieldInfos, state.segmentInfo.name, state.segmentInfo.docCount, cfs, state.context);
     } else {
       cfs = null;
-      docValues = new TreeMap<String,IndexDocValues>();
+      docValues = new TreeMap<String,DocValues>();
     }
   }
   
   @Override
-  protected Map<String,IndexDocValues> docValues() {
+  protected Map<String,DocValues> docValues() {
     return docValues;
   }
 

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/Lucene40FieldInfosReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/Lucene40FieldInfosReader.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/Lucene40FieldInfosReader.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/Lucene40FieldInfosReader.java Fri Dec  9 16:43:45 2011
@@ -12,7 +12,7 @@ import org.apache.lucene.index.IndexForm
 import org.apache.lucene.index.SegmentInfo;
 import org.apache.lucene.index.FieldInfo.IndexOptions;
 import org.apache.lucene.index.codecs.FieldInfosReader;
-import org.apache.lucene.index.values.ValueType;
+import org.apache.lucene.index.DocValues;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexInput;
@@ -95,7 +95,7 @@ public class Lucene40FieldInfosReader ex
         hasVectors |= storeTermVector;
         hasProx |= isIndexed && indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
         hasFreq |= isIndexed && indexOptions != IndexOptions.DOCS_ONLY;
-        ValueType docValuesType = null;
+        DocValues.Type docValuesType = null;
         if (format <= Lucene40FieldInfosWriter.FORMAT_FLEX) {
           final byte b = input.readByte();
           switch(b) {
@@ -103,43 +103,43 @@ public class Lucene40FieldInfosReader ex
               docValuesType = null;
               break;
             case 1:
-              docValuesType = ValueType.VAR_INTS;
+              docValuesType = DocValues.Type.VAR_INTS;
               break;
             case 2:
-              docValuesType = ValueType.FLOAT_32;
+              docValuesType = DocValues.Type.FLOAT_32;
               break;
             case 3:
-              docValuesType = ValueType.FLOAT_64;
+              docValuesType = DocValues.Type.FLOAT_64;
               break;
             case 4:
-              docValuesType = ValueType.BYTES_FIXED_STRAIGHT;
+              docValuesType = DocValues.Type.BYTES_FIXED_STRAIGHT;
               break;
             case 5:
-              docValuesType = ValueType.BYTES_FIXED_DEREF;
+              docValuesType = DocValues.Type.BYTES_FIXED_DEREF;
               break;
             case 6:
-              docValuesType = ValueType.BYTES_VAR_STRAIGHT;
+              docValuesType = DocValues.Type.BYTES_VAR_STRAIGHT;
               break;
             case 7:
-              docValuesType = ValueType.BYTES_VAR_DEREF;
+              docValuesType = DocValues.Type.BYTES_VAR_DEREF;
               break;
             case 8:
-              docValuesType = ValueType.FIXED_INTS_16;
+              docValuesType = DocValues.Type.FIXED_INTS_16;
               break;
             case 9:
-              docValuesType = ValueType.FIXED_INTS_32;
+              docValuesType = DocValues.Type.FIXED_INTS_32;
               break;
             case 10:
-              docValuesType = ValueType.FIXED_INTS_64;
+              docValuesType = DocValues.Type.FIXED_INTS_64;
               break;
             case 11:
-              docValuesType = ValueType.FIXED_INTS_8;
+              docValuesType = DocValues.Type.FIXED_INTS_8;
               break;
             case 12:
-              docValuesType = ValueType.BYTES_FIXED_SORTED;
+              docValuesType = DocValues.Type.BYTES_FIXED_SORTED;
               break;
             case 13:
-              docValuesType = ValueType.BYTES_VAR_SORTED;
+              docValuesType = DocValues.Type.BYTES_VAR_SORTED;
               break;
         
             default:

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Bytes.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Bytes.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Bytes.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Bytes.java Fri Dec  9 16:43:45 2011
@@ -22,12 +22,12 @@ import java.io.IOException;
 import java.util.Comparator;
 import java.util.concurrent.atomic.AtomicLong;
 
+import org.apache.lucene.index.DocValues;
 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.Source;
+import org.apache.lucene.index.PerDocFieldValues;
+import org.apache.lucene.index.DocValues.SortedSource;
+import org.apache.lucene.index.DocValues.Source;
+import org.apache.lucene.index.DocValues.Type;
 import org.apache.lucene.store.DataOutput;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IOContext;
@@ -150,13 +150,13 @@ public final class Bytes {
   }
 
   /**
-   * Creates a new {@link IndexDocValues} instance that provides either memory
+   * Creates a new {@link DocValues} instance that provides either memory
    * resident or iterative access to a per-document stored <tt>byte[]</tt>
-   * value. The returned {@link IndexDocValues} instance will be initialized without
+   * value. The returned {@link DocValues} instance will be initialized without
    * consuming a significant amount of memory.
    * 
    * @param dir
-   *          the directory to load the {@link IndexDocValues} from.
+   *          the directory to load the {@link DocValues} from.
    * @param id
    *          the file ID in the {@link Directory} to load the values from.
    * @param mode
@@ -169,11 +169,11 @@ public final class Bytes {
    * @param sortComparator {@link BytesRef} comparator used by sorted variants. 
    *        If <code>null</code> {@link BytesRef#getUTF8SortedAsUnicodeComparator()}
    *        is used instead
-   * @return an initialized {@link IndexDocValues} instance.
+   * @return an initialized {@link DocValues} instance.
    * @throws IOException
    *           if an {@link IOException} occurs
    */
-  public static IndexDocValues getValues(Directory dir, String id, Mode mode,
+  public static DocValues getValues(Directory dir, String id, Mode mode,
       boolean fixedSize, int maxDoc, Comparator<BytesRef> sortComparator, IOContext context) throws IOException {
     if (sortComparator == null) {
       sortComparator = BytesRef.getUTF8SortedAsUnicodeComparator();
@@ -185,7 +185,7 @@ public final class Bytes {
       } else if (mode == Mode.DEREF) {
         return new FixedDerefBytesImpl.FixedDerefReader(dir, id, maxDoc, context);
       } else if (mode == Mode.SORTED) {
-        return new FixedSortedBytesImpl.Reader(dir, id, maxDoc, context, ValueType.BYTES_FIXED_SORTED, sortComparator);
+        return new FixedSortedBytesImpl.Reader(dir, id, maxDoc, context, Type.BYTES_FIXED_SORTED, sortComparator);
       }
     } else {
       if (mode == Mode.STRAIGHT) {
@@ -193,7 +193,7 @@ public final class Bytes {
       } else if (mode == Mode.DEREF) {
         return new VarDerefBytesImpl.VarDerefReader(dir, id, maxDoc, context);
       } else if (mode == Mode.SORTED) {
-        return new VarSortedBytesImpl.Reader(dir, id, maxDoc,context, ValueType.BYTES_VAR_SORTED, sortComparator);
+        return new VarSortedBytesImpl.Reader(dir, id, maxDoc,context, Type.BYTES_VAR_SORTED, sortComparator);
       }
     }
 
@@ -211,7 +211,7 @@ public final class Bytes {
     
 
     protected BytesSourceBase(IndexInput datIn, IndexInput idxIn,
-        PagedBytes pagedBytes, long bytesToRead, ValueType type) throws IOException {
+        PagedBytes pagedBytes, long bytesToRead, Type type) throws IOException {
       super(type);
       assert bytesToRead <= datIn.length() : " file size is less than the expected size diff: "
           + (bytesToRead - datIn.length()) + " pos: " + datIn.getFilePointer();
@@ -314,15 +314,15 @@ public final class Bytes {
    * Opens all necessary files, but does not read any data in until you call
    * {@link #load}.
    */
-  static abstract class BytesReaderBase extends IndexDocValues {
+  static abstract class BytesReaderBase extends DocValues {
     protected final IndexInput idxIn;
     protected final IndexInput datIn;
     protected final int version;
     protected final String id;
-    protected final ValueType type;
+    protected final Type type;
 
     protected BytesReaderBase(Directory dir, String id, String codecName,
-        int maxVersion, boolean doIndex, IOContext context, ValueType type) throws IOException {
+        int maxVersion, boolean doIndex, IOContext context, Type type) throws IOException {
       IndexInput dataIn = null;
       IndexInput indexIn = null;
       boolean success = false;
@@ -375,7 +375,7 @@ public final class Bytes {
     }
 
     @Override
-    public ValueType type() {
+    public Type type() {
       return type;
     }
     
@@ -559,12 +559,12 @@ public final class Bytes {
     protected final PagedBytes.Reader data;
 
     protected BytesSortedSourceBase(IndexInput datIn, IndexInput idxIn,
-        Comparator<BytesRef> comp, long bytesToRead, ValueType type, boolean hasOffsets) throws IOException {
+        Comparator<BytesRef> comp, long bytesToRead, Type type, boolean hasOffsets) throws IOException {
       this(datIn, idxIn, comp, new PagedBytes(PAGED_BYTES_BITS), bytesToRead, type, hasOffsets);
     }
     
     protected BytesSortedSourceBase(IndexInput datIn, IndexInput idxIn,
-        Comparator<BytesRef> comp, PagedBytes pagedBytes, long bytesToRead, ValueType type, boolean hasOffsets)
+        Comparator<BytesRef> comp, PagedBytes pagedBytes, long bytesToRead, Type type, boolean hasOffsets)
         throws IOException {
       super(type, comp);
       assert bytesToRead <= datIn.length() : " file size is less than the expected size diff: "

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/DirectSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/DirectSource.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/DirectSource.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/DirectSource.java Fri Dec  9 16:43:45 2011
@@ -19,9 +19,9 @@ package org.apache.lucene.index.codecs.l
 
 import java.io.IOException;
 
-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.DocValues;
+import org.apache.lucene.index.DocValues.Source;
+import org.apache.lucene.index.DocValues.Type;
 import org.apache.lucene.store.IndexInput;
 import org.apache.lucene.util.BytesRef;
 
@@ -35,7 +35,7 @@ public abstract class DirectSource exten
   private final ToNumeric toNumeric;
   protected final long baseOffset;
 
-  public DirectSource(IndexInput input, ValueType type) {
+  public DirectSource(IndexInput input, Type type) {
     super(type);
     this.data = input;
     baseOffset = input.getFilePointer();

Copied: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/DocValuesArray.java (from r1212424, lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/IndexDocValuesArray.java)
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/DocValuesArray.java?p2=lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/DocValuesArray.java&p1=lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/IndexDocValuesArray.java&r1=1212424&r2=1212506&rev=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/IndexDocValuesArray.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/DocValuesArray.java Fri Dec  9 16:43:45 2011
@@ -5,8 +5,8 @@ import java.util.Collections;
 import java.util.EnumMap;
 import java.util.Map;
 
-import org.apache.lucene.index.values.ValueType;
-import org.apache.lucene.index.values.IndexDocValues.Source;
+import org.apache.lucene.index.DocValues.Source;
+import org.apache.lucene.index.DocValues.Type;
 import org.apache.lucene.store.IndexInput;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.RamUsageEstimator;
@@ -31,30 +31,30 @@ import org.apache.lucene.util.RamUsageEs
 /**
  * @lucene.experimental
  */
-abstract class IndexDocValuesArray extends Source {
+abstract class DocValuesArray extends Source {
 
-  static final Map<ValueType, IndexDocValuesArray> TEMPLATES;
+  static final Map<Type, DocValuesArray> TEMPLATES;
 
   static {
-    EnumMap<ValueType, IndexDocValuesArray> templates = new EnumMap<ValueType, IndexDocValuesArray>(
-        ValueType.class);
-    templates.put(ValueType.FIXED_INTS_16, new ShortValues());
-    templates.put(ValueType.FIXED_INTS_32, new IntValues());
-    templates.put(ValueType.FIXED_INTS_64, new LongValues());
-    templates.put(ValueType.FIXED_INTS_8, new ByteValues());
-    templates.put(ValueType.FLOAT_32, new FloatValues());
-    templates.put(ValueType.FLOAT_64, new DoubleValues());
+    EnumMap<Type, DocValuesArray> templates = new EnumMap<Type, DocValuesArray>(
+        Type.class);
+    templates.put(Type.FIXED_INTS_16, new ShortValues());
+    templates.put(Type.FIXED_INTS_32, new IntValues());
+    templates.put(Type.FIXED_INTS_64, new LongValues());
+    templates.put(Type.FIXED_INTS_8, new ByteValues());
+    templates.put(Type.FLOAT_32, new FloatValues());
+    templates.put(Type.FLOAT_64, new DoubleValues());
     TEMPLATES = Collections.unmodifiableMap(templates);
   }
 
   protected final int bytesPerValue;
 
-  IndexDocValuesArray(int bytesPerValue, ValueType type) {
+  DocValuesArray(int bytesPerValue, Type type) {
     super(type);
     this.bytesPerValue = bytesPerValue;
   }
 
-  public abstract IndexDocValuesArray newFromInput(IndexInput input, int numDocs)
+  public abstract DocValuesArray newFromInput(IndexInput input, int numDocs)
       throws IOException;
 
   @Override
@@ -70,16 +70,16 @@ abstract class IndexDocValuesArray exten
     BytesRefUtils.copyLong(bytesRef, Double.doubleToRawLongBits(value));
   }
 
-  final static class ByteValues extends IndexDocValuesArray {
+  final static class ByteValues extends DocValuesArray {
     private final byte[] values;
 
     ByteValues() {
-      super(1, ValueType.FIXED_INTS_8);
+      super(1, Type.FIXED_INTS_8);
       values = new byte[0];
     }
 
     private ByteValues(IndexInput input, int numDocs) throws IOException {
-      super(1, ValueType.FIXED_INTS_8);
+      super(1, Type.FIXED_INTS_8);
       values = new byte[numDocs];
       input.readBytes(values, 0, values.length, false);
     }
@@ -96,7 +96,7 @@ abstract class IndexDocValuesArray exten
     }
 
     @Override
-    public IndexDocValuesArray newFromInput(IndexInput input, int numDocs)
+    public DocValuesArray newFromInput(IndexInput input, int numDocs)
         throws IOException {
       return new ByteValues(input, numDocs);
     }
@@ -107,16 +107,16 @@ abstract class IndexDocValuesArray exten
 
   };
 
-  final static class ShortValues extends IndexDocValuesArray {
+  final static class ShortValues extends DocValuesArray {
     private final short[] values;
 
     ShortValues() {
-      super(RamUsageEstimator.NUM_BYTES_SHORT, ValueType.FIXED_INTS_16);
+      super(RamUsageEstimator.NUM_BYTES_SHORT, Type.FIXED_INTS_16);
       values = new short[0];
     }
 
     private ShortValues(IndexInput input, int numDocs) throws IOException {
-      super(RamUsageEstimator.NUM_BYTES_SHORT, ValueType.FIXED_INTS_16);
+      super(RamUsageEstimator.NUM_BYTES_SHORT, Type.FIXED_INTS_16);
       values = new short[numDocs];
       for (int i = 0; i < values.length; i++) {
         values[i] = input.readShort();
@@ -135,7 +135,7 @@ abstract class IndexDocValuesArray exten
     }
 
     @Override
-    public IndexDocValuesArray newFromInput(IndexInput input, int numDocs)
+    public DocValuesArray newFromInput(IndexInput input, int numDocs)
         throws IOException {
       return new ShortValues(input, numDocs);
     }
@@ -146,16 +146,16 @@ abstract class IndexDocValuesArray exten
 
   };
 
-  final static class IntValues extends IndexDocValuesArray {
+  final static class IntValues extends DocValuesArray {
     private final int[] values;
 
     IntValues() {
-      super(RamUsageEstimator.NUM_BYTES_INT, ValueType.FIXED_INTS_32);
+      super(RamUsageEstimator.NUM_BYTES_INT, Type.FIXED_INTS_32);
       values = new int[0];
     }
 
     private IntValues(IndexInput input, int numDocs) throws IOException {
-      super(RamUsageEstimator.NUM_BYTES_INT, ValueType.FIXED_INTS_32);
+      super(RamUsageEstimator.NUM_BYTES_INT, Type.FIXED_INTS_32);
       values = new int[numDocs];
       for (int i = 0; i < values.length; i++) {
         values[i] = input.readInt();
@@ -174,7 +174,7 @@ abstract class IndexDocValuesArray exten
     }
 
     @Override
-    public IndexDocValuesArray newFromInput(IndexInput input, int numDocs)
+    public DocValuesArray newFromInput(IndexInput input, int numDocs)
         throws IOException {
       return new IntValues(input, numDocs);
     }
@@ -185,16 +185,16 @@ abstract class IndexDocValuesArray exten
 
   };
 
-  final static class LongValues extends IndexDocValuesArray {
+  final static class LongValues extends DocValuesArray {
     private final long[] values;
 
     LongValues() {
-      super(RamUsageEstimator.NUM_BYTES_LONG, ValueType.FIXED_INTS_64);
+      super(RamUsageEstimator.NUM_BYTES_LONG, Type.FIXED_INTS_64);
       values = new long[0];
     }
 
     private LongValues(IndexInput input, int numDocs) throws IOException {
-      super(RamUsageEstimator.NUM_BYTES_LONG, ValueType.FIXED_INTS_64);
+      super(RamUsageEstimator.NUM_BYTES_LONG, Type.FIXED_INTS_64);
       values = new long[numDocs];
       for (int i = 0; i < values.length; i++) {
         values[i] = input.readLong();
@@ -213,23 +213,23 @@ abstract class IndexDocValuesArray exten
     }
 
     @Override
-    public IndexDocValuesArray newFromInput(IndexInput input, int numDocs)
+    public DocValuesArray newFromInput(IndexInput input, int numDocs)
         throws IOException {
       return new LongValues(input, numDocs);
     }
 
   };
 
-  final static class FloatValues extends IndexDocValuesArray {
+  final static class FloatValues extends DocValuesArray {
     private final float[] values;
 
     FloatValues() {
-      super(RamUsageEstimator.NUM_BYTES_FLOAT, ValueType.FLOAT_32);
+      super(RamUsageEstimator.NUM_BYTES_FLOAT, Type.FLOAT_32);
       values = new float[0];
     }
 
     private FloatValues(IndexInput input, int numDocs) throws IOException {
-      super(RamUsageEstimator.NUM_BYTES_FLOAT, ValueType.FLOAT_32);
+      super(RamUsageEstimator.NUM_BYTES_FLOAT, Type.FLOAT_32);
       values = new float[numDocs];
       /*
        * we always read BIG_ENDIAN here since the writer serialized plain bytes
@@ -258,22 +258,22 @@ abstract class IndexDocValuesArray exten
     }
 
     @Override
-    public IndexDocValuesArray newFromInput(IndexInput input, int numDocs)
+    public DocValuesArray newFromInput(IndexInput input, int numDocs)
         throws IOException {
       return new FloatValues(input, numDocs);
     }
   };
 
-  final static class DoubleValues extends IndexDocValuesArray {
+  final static class DoubleValues extends DocValuesArray {
     private final double[] values;
 
     DoubleValues() {
-      super(RamUsageEstimator.NUM_BYTES_DOUBLE, ValueType.FLOAT_64);
+      super(RamUsageEstimator.NUM_BYTES_DOUBLE, Type.FLOAT_64);
       values = new double[0];
     }
 
     private DoubleValues(IndexInput input, int numDocs) throws IOException {
-      super(RamUsageEstimator.NUM_BYTES_DOUBLE, ValueType.FLOAT_64);
+      super(RamUsageEstimator.NUM_BYTES_DOUBLE, Type.FLOAT_64);
       values = new double[numDocs];
       /*
        * we always read BIG_ENDIAN here since the writer serialized plain bytes
@@ -296,7 +296,7 @@ abstract class IndexDocValuesArray exten
     }
 
     @Override
-    public IndexDocValuesArray newFromInput(IndexInput input, int numDocs)
+    public DocValuesArray newFromInput(IndexInput input, int numDocs)
         throws IOException {
       return new DoubleValues(input, numDocs);
     }

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/FixedDerefBytesImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/FixedDerefBytesImpl.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/FixedDerefBytesImpl.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/FixedDerefBytesImpl.java Fri Dec  9 16:43:45 2011
@@ -22,7 +22,7 @@ import java.io.IOException;
 import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesReaderBase;
 import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesSourceBase;
 import org.apache.lucene.index.codecs.lucene40.values.Bytes.DerefBytesWriterBase;
-import org.apache.lucene.index.values.ValueType;
+import org.apache.lucene.index.DocValues.Type;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexInput;
@@ -71,7 +71,7 @@ class FixedDerefBytesImpl {
     private final int size;
     private final int numValuesStored;
     FixedDerefReader(Directory dir, String id, int maxDoc, IOContext context) throws IOException {
-      super(dir, id, CODEC_NAME, VERSION_START, true, context, ValueType.BYTES_FIXED_DEREF);
+      super(dir, id, CODEC_NAME, VERSION_START, true, context, Type.BYTES_FIXED_DEREF);
       size = datIn.readInt();
       numValuesStored = idxIn.readInt();
     }
@@ -100,7 +100,7 @@ class FixedDerefBytesImpl {
 
     protected FixedDerefSource(IndexInput datIn, IndexInput idxIn, int size, long numValues) throws IOException {
       super(datIn, idxIn, new PagedBytes(PAGED_BYTES_BITS), size * numValues,
-          ValueType.BYTES_FIXED_DEREF);
+          Type.BYTES_FIXED_DEREF);
       this.size = size;
       addresses = PackedInts.getReader(idxIn);
     }
@@ -117,7 +117,7 @@ class FixedDerefBytesImpl {
     private final PackedInts.Reader index;
     private final int size;
 
-    DirectFixedDerefSource(IndexInput data, IndexInput index, int size, ValueType type)
+    DirectFixedDerefSource(IndexInput data, IndexInput index, int size, Type type)
         throws IOException {
       super(data, type);
       this.size = size;

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/FixedSortedBytesImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/FixedSortedBytesImpl.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/FixedSortedBytesImpl.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/FixedSortedBytesImpl.java Fri Dec  9 16:43:45 2011
@@ -21,15 +21,15 @@ import java.io.IOException;
 import java.util.Comparator;
 import java.util.List;
 
+import org.apache.lucene.index.DocValues;
+import org.apache.lucene.index.DocValues.SortedSource;
+import org.apache.lucene.index.DocValues.Type;
 import org.apache.lucene.index.MergeState;
 import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesReaderBase;
 import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesSortedSourceBase;
 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.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexInput;
@@ -61,11 +61,11 @@ class FixedSortedBytesImpl {
     }
 
     @Override
-    public void merge(MergeState mergeState, IndexDocValues[] docValues)
+    public void merge(MergeState mergeState, DocValues[] docValues)
         throws IOException {
       boolean success = false;
       try {
-        final MergeContext ctx = SortedBytesMergeUtils.init(ValueType.BYTES_FIXED_SORTED, docValues, comp, mergeState);
+        final MergeContext ctx = SortedBytesMergeUtils.init(Type.BYTES_FIXED_SORTED, docValues, comp, mergeState);
         List<SortedSourceSlice> slices = SortedBytesMergeUtils.buildSlices(mergeState, docValues, ctx);
         final IndexOutput datOut = getOrCreateDataOut();
         datOut.writeInt(ctx.sizePerValues);
@@ -124,7 +124,7 @@ class FixedSortedBytesImpl {
     private final Comparator<BytesRef> comparator;
 
     public Reader(Directory dir, String id, int maxDoc, IOContext context,
-        ValueType type, Comparator<BytesRef> comparator) throws IOException {
+        Type type, Comparator<BytesRef> comparator) throws IOException {
       super(dir, id, CODEC_NAME, VERSION_START, true, context, type);
       size = datIn.readInt();
       valueCount = idxIn.readInt();
@@ -155,7 +155,7 @@ class FixedSortedBytesImpl {
 
     FixedSortedSource(IndexInput datIn, IndexInput idxIn, int size,
         int numValues, Comparator<BytesRef> comp) throws IOException {
-      super(datIn, idxIn, comp, size * numValues, ValueType.BYTES_FIXED_SORTED,
+      super(datIn, idxIn, comp, size * numValues, Type.BYTES_FIXED_SORTED,
           false);
       this.size = size;
       this.valueCount = numValues;
@@ -181,7 +181,7 @@ class FixedSortedBytesImpl {
     private final int valueCount;
 
     DirectFixedSortedSource(IndexInput datIn, IndexInput idxIn, int size,
-        int valueCount, Comparator<BytesRef> comp, ValueType type)
+        int valueCount, Comparator<BytesRef> comp, Type type)
         throws IOException {
       super(type, comp);
       docToOrdIndex = PackedInts.getDirectReader(idxIn);

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/FixedStraightBytesImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/FixedStraightBytesImpl.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/FixedStraightBytesImpl.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/FixedStraightBytesImpl.java Fri Dec  9 16:43:45 2011
@@ -21,12 +21,12 @@ import static org.apache.lucene.util.Byt
 
 import java.io.IOException;
 
+import org.apache.lucene.index.DocValues;
+import org.apache.lucene.index.DocValues.Source;
+import org.apache.lucene.index.DocValues.Type;
 import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesReaderBase;
 import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesSourceBase;
 import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesWriterBase;
-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.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexInput;
@@ -180,7 +180,7 @@ class FixedStraightBytesImpl {
       }
     }
     
-    protected boolean tryBulkMerge(IndexDocValues docValues) {
+    protected boolean tryBulkMerge(DocValues docValues) {
       return docValues instanceof FixedStraightReader;
     }
     
@@ -256,10 +256,10 @@ class FixedStraightBytesImpl {
     protected final int maxDoc;
     
     FixedStraightReader(Directory dir, String id, int maxDoc, IOContext context) throws IOException {
-      this(dir, id, CODEC_NAME, VERSION_CURRENT, maxDoc, context, ValueType.BYTES_FIXED_STRAIGHT);
+      this(dir, id, CODEC_NAME, VERSION_CURRENT, maxDoc, context, Type.BYTES_FIXED_STRAIGHT);
     }
 
-    protected FixedStraightReader(Directory dir, String id, String codec, int version, int maxDoc, IOContext context, ValueType type) throws IOException {
+    protected FixedStraightReader(Directory dir, String id, String codec, int version, int maxDoc, IOContext context, Type type) throws IOException {
       super(dir, id, codec, version, false, context, type);
       size = datIn.readInt();
       this.maxDoc = maxDoc;
@@ -292,7 +292,7 @@ class FixedStraightBytesImpl {
     private final byte[] data;
 
     public SingleByteSource(IndexInput datIn, int maxDoc) throws IOException {
-      super(ValueType.BYTES_FIXED_STRAIGHT);
+      super(Type.BYTES_FIXED_STRAIGHT);
       try {
         data = new byte[maxDoc];
         datIn.readBytes(data, 0, data.length, false);
@@ -324,7 +324,7 @@ class FixedStraightBytesImpl {
   private final static class FixedStraightSource extends BytesSourceBase {
     private final int size;
 
-    public FixedStraightSource(IndexInput datIn, int size, int maxDoc, ValueType type)
+    public FixedStraightSource(IndexInput datIn, int size, int maxDoc, Type type)
         throws IOException {
       super(datIn, null, new PagedBytes(PAGED_BYTES_BITS), size * maxDoc,
           type);
@@ -340,7 +340,7 @@ class FixedStraightBytesImpl {
   public final static class DirectFixedStraightSource extends DirectSource {
     private final int size;
 
-    DirectFixedStraightSource(IndexInput input, int size, ValueType type) {
+    DirectFixedStraightSource(IndexInput input, int size, Type type) {
       super(input, type);
       this.size = size;
     }

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Floats.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Floats.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Floats.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Floats.java Fri Dec  9 16:43:45 2011
@@ -18,10 +18,10 @@ package org.apache.lucene.index.codecs.l
  */
 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.DocValues;
+import org.apache.lucene.index.PerDocFieldValues;
+import org.apache.lucene.index.DocValues.Source;
+import org.apache.lucene.index.DocValues.Type;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexInput;
@@ -45,16 +45,16 @@ public class Floats {
   protected static final int VERSION_CURRENT = VERSION_START;
   
   public static Writer getWriter(Directory dir, String id, Counter bytesUsed,
-      IOContext context, ValueType type) throws IOException {
+      IOContext context, Type type) throws IOException {
     return new FloatsWriter(dir, id, bytesUsed, context, type);
   }
 
-  public static IndexDocValues getValues(Directory dir, String id, int maxDoc, IOContext context, ValueType type)
+  public static DocValues getValues(Directory dir, String id, int maxDoc, IOContext context, Type type)
       throws IOException {
     return new FloatsReader(dir, id, maxDoc, context, type);
   }
   
-  private static int typeToSize(ValueType type) {
+  private static int typeToSize(Type type) {
     switch (type) {
     case FLOAT_32:
       return 4;
@@ -68,14 +68,14 @@ public class Floats {
   final static class FloatsWriter extends FixedStraightBytesImpl.Writer {
    
     private final int size; 
-    private final IndexDocValuesArray template;
+    private final DocValuesArray template;
     public FloatsWriter(Directory dir, String id, Counter bytesUsed,
-        IOContext context, ValueType type) throws IOException {
+        IOContext context, Type type) throws IOException {
       super(dir, id, CODEC_NAME, VERSION_CURRENT, bytesUsed, context);
       size = typeToSize(type);
       this.bytesRef = new BytesRef(size);
       bytesRef.length = size;
-      template = IndexDocValuesArray.TEMPLATES.get(type);
+      template = DocValuesArray.TEMPLATES.get(type);
       assert template != null;
     }
     
@@ -90,7 +90,7 @@ public class Floats {
     }
     
     @Override
-    protected boolean tryBulkMerge(IndexDocValues docValues) {
+    protected boolean tryBulkMerge(DocValues docValues) {
       // only bulk merge if value type is the same otherwise size differs
       return super.tryBulkMerge(docValues) && docValues.type() == template.type();
     }
@@ -103,11 +103,11 @@ public class Floats {
   }
   
   final static class FloatsReader extends FixedStraightBytesImpl.FixedStraightReader {
-    final IndexDocValuesArray arrayTemplate;
-    FloatsReader(Directory dir, String id, int maxDoc, IOContext context, ValueType type)
+    final DocValuesArray arrayTemplate;
+    FloatsReader(Directory dir, String id, int maxDoc, IOContext context, Type type)
         throws IOException {
       super(dir, id, CODEC_NAME, VERSION_CURRENT, maxDoc, context, type);
-      arrayTemplate = IndexDocValuesArray.TEMPLATES.get(type);
+      arrayTemplate = DocValuesArray.TEMPLATES.get(type);
       assert size == 4 || size == 8;
     }
     

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Ints.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Ints.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Ints.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Ints.java Fri Dec  9 16:43:45 2011
@@ -19,9 +19,9 @@ package org.apache.lucene.index.codecs.l
 
 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.DocValues;
+import org.apache.lucene.index.DocValues.Type;
+import org.apache.lucene.index.PerDocFieldValues;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexInput;
@@ -43,33 +43,33 @@ public final class Ints {
   }
   
   public static Writer getWriter(Directory dir, String id, Counter bytesUsed,
-      ValueType type, IOContext context) throws IOException {
-    return type == ValueType.VAR_INTS ? new PackedIntValues.PackedIntsWriter(dir, id,
+      Type type, IOContext context) throws IOException {
+    return type == Type.VAR_INTS ? new PackedIntValues.PackedIntsWriter(dir, id,
         bytesUsed, context) : new IntsWriter(dir, id, bytesUsed, context, type);
   }
 
-  public static IndexDocValues getValues(Directory dir, String id, int numDocs,
-      ValueType type, IOContext context) throws IOException {
-    return type == ValueType.VAR_INTS ? new PackedIntValues.PackedIntsReader(dir, id,
+  public static DocValues getValues(Directory dir, String id, int numDocs,
+      Type type, IOContext context) throws IOException {
+    return type == Type.VAR_INTS ? new PackedIntValues.PackedIntsReader(dir, id,
         numDocs, context) : new IntsReader(dir, id, numDocs, context, type);
   }
   
-  private static ValueType sizeToType(int size) {
+  private static Type sizeToType(int size) {
     switch (size) {
     case 1:
-      return ValueType.FIXED_INTS_8;
+      return Type.FIXED_INTS_8;
     case 2:
-      return ValueType.FIXED_INTS_16;
+      return Type.FIXED_INTS_16;
     case 4:
-      return ValueType.FIXED_INTS_32;
+      return Type.FIXED_INTS_32;
     case 8:
-      return ValueType.FIXED_INTS_64;
+      return Type.FIXED_INTS_64;
     default:
       throw new IllegalStateException("illegal size " + size);
     }
   }
   
-  private static int typeToSize(ValueType type) {
+  private static int typeToSize(Type type) {
     switch (type) {
     case FIXED_INTS_16:
       return 2;
@@ -86,20 +86,20 @@ public final class Ints {
 
 
   static class IntsWriter extends FixedStraightBytesImpl.Writer {
-    private final IndexDocValuesArray template;
+    private final DocValuesArray template;
 
     public IntsWriter(Directory dir, String id, Counter bytesUsed,
-        IOContext context, ValueType valueType) throws IOException {
+        IOContext context, Type valueType) throws IOException {
       this(dir, id, CODEC_NAME, VERSION_CURRENT, bytesUsed, context, valueType);
     }
 
     protected IntsWriter(Directory dir, String id, String codecName,
-        int version, Counter bytesUsed, IOContext context, ValueType valueType) throws IOException {
+        int version, Counter bytesUsed, IOContext context, Type valueType) throws IOException {
       super(dir, id, codecName, version, bytesUsed, context);
       size = typeToSize(valueType);
       this.bytesRef = new BytesRef(size);
       bytesRef.length = size;
-      template = IndexDocValuesArray.TEMPLATES.get(valueType);
+      template = DocValuesArray.TEMPLATES.get(valueType);
     }
     
     @Override
@@ -120,20 +120,20 @@ public final class Ints {
     }
     
     @Override
-    protected boolean tryBulkMerge(IndexDocValues docValues) {
+    protected boolean tryBulkMerge(DocValues docValues) {
       // only bulk merge if value type is the same otherwise size differs
       return super.tryBulkMerge(docValues) && docValues.type() == template.type();
     }
   }
   
   final static class IntsReader extends FixedStraightBytesImpl.FixedStraightReader {
-    private final IndexDocValuesArray arrayTemplate;
+    private final DocValuesArray arrayTemplate;
 
-    IntsReader(Directory dir, String id, int maxDoc, IOContext context, ValueType type)
+    IntsReader(Directory dir, String id, int maxDoc, IOContext context, Type type)
         throws IOException {
       super(dir, id, CODEC_NAME, VERSION_CURRENT, maxDoc,
           context, type);
-      arrayTemplate = IndexDocValuesArray.TEMPLATES.get(type);
+      arrayTemplate = DocValuesArray.TEMPLATES.get(type);
       assert arrayTemplate != null;
       assert type == sizeToType(size);
     }

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/PackedIntValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/PackedIntValues.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/PackedIntValues.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/PackedIntValues.java Fri Dec  9 16:43:45 2011
@@ -18,13 +18,13 @@ package org.apache.lucene.index.codecs.l
  */
 import java.io.IOException;
 
+import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.IndexFileNames;
+import org.apache.lucene.index.PerDocFieldValues;
+import org.apache.lucene.index.DocValues.Source;
+import org.apache.lucene.index.DocValues.Type;
 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.codecs.lucene40.values.DocValuesArray.LongValues;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexInput;
@@ -160,7 +160,7 @@ class PackedIntValues {
    * Opens all necessary files, but does not read any data in until you call
    * {@link #load}.
    */
-  static class PackedIntsReader extends IndexDocValues {
+  static class PackedIntsReader extends DocValues {
     private final IndexInput datIn;
     private final byte type;
     private final int numDocs;
@@ -220,14 +220,14 @@ class PackedIntValues {
 
 
     @Override
-    public ValueType type() {
-      return ValueType.VAR_INTS;
+    public Type type() {
+      return Type.VAR_INTS;
     }
 
 
     @Override
     public Source getDirectSource() throws IOException {
-      return values != null ? new FixedStraightBytesImpl.DirectFixedStraightSource((IndexInput) datIn.clone(), 8, ValueType.FIXED_INTS_64) : new PackedIntsSource((IndexInput) datIn.clone(), true);
+      return values != null ? new FixedStraightBytesImpl.DirectFixedStraightSource((IndexInput) datIn.clone(), 8, Type.FIXED_INTS_64) : new PackedIntsSource((IndexInput) datIn.clone(), true);
     }
   }
 
@@ -238,7 +238,7 @@ class PackedIntValues {
     private final PackedInts.Reader values;
 
     public PackedIntsSource(IndexInput dataIn, boolean direct) throws IOException {
-      super(ValueType.VAR_INTS);
+      super(Type.VAR_INTS);
       minValue = dataIn.readLong();
       defaultValue = dataIn.readLong();
       values = direct ? PackedInts.getDirectReader(dataIn) : PackedInts.getReader(dataIn);

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/SortedBytesMergeUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/SortedBytesMergeUtils.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/SortedBytesMergeUtils.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/SortedBytesMergeUtils.java Fri Dec  9 16:43:45 2011
@@ -22,12 +22,12 @@ import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
 
+import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.MergeState;
+import org.apache.lucene.index.DocValues.SortedSource;
+import org.apache.lucene.index.DocValues.Source;
+import org.apache.lucene.index.DocValues.Type;
 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.Source;
 import org.apache.lucene.store.IndexOutput;
 import org.apache.lucene.util.ArrayUtil;
 import org.apache.lucene.util.BytesRef;
@@ -43,11 +43,11 @@ final class SortedBytesMergeUtils {
     // no instance
   }
 
-  static MergeContext init(ValueType type, IndexDocValues[] docValues,
+  static MergeContext init(Type type, DocValues[] docValues,
       Comparator<BytesRef> comp, MergeState mergeState) {
     int size = -1;
-    if (type == ValueType.BYTES_FIXED_SORTED) {
-      for (IndexDocValues indexDocValues : docValues) {
+    if (type == Type.BYTES_FIXED_SORTED) {
+      for (DocValues indexDocValues : docValues) {
         if (indexDocValues != null) {
           size = indexDocValues.getValueSize();
           break;
@@ -62,13 +62,13 @@ final class SortedBytesMergeUtils {
     private final Comparator<BytesRef> comp;
     private final BytesRef missingValue = new BytesRef();
     final int sizePerValues; // -1 if var length
-    final ValueType type;
+    final Type type;
     final int[] docToEntry;
     long[] offsets; // if non-null #mergeRecords collects byte offsets here
 
     public MergeContext(Comparator<BytesRef> comp, MergeState mergeState,
-        int size, ValueType type) {
-      assert type == ValueType.BYTES_FIXED_SORTED || type == ValueType.BYTES_VAR_SORTED;
+        int size, Type type) {
+      assert type == Type.BYTES_FIXED_SORTED || type == Type.BYTES_VAR_SORTED;
       this.comp = comp;
       this.sizePerValues = size;
       this.type = type;
@@ -81,7 +81,7 @@ final class SortedBytesMergeUtils {
   }
 
   static List<SortedSourceSlice> buildSlices(MergeState mergeState,
-      IndexDocValues[] docValues, MergeContext ctx) throws IOException {
+      DocValues[] docValues, MergeContext ctx) throws IOException {
     final List<SortedSourceSlice> slices = new ArrayList<SortedSourceSlice>();
     for (int i = 0; i < docValues.length; i++) {
       final SortedSourceSlice nextSlice;

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/VarDerefBytesImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/VarDerefBytesImpl.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/VarDerefBytesImpl.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/VarDerefBytesImpl.java Fri Dec  9 16:43:45 2011
@@ -22,7 +22,7 @@ import java.io.IOException;
 import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesReaderBase;
 import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesSourceBase;
 import org.apache.lucene.index.codecs.lucene40.values.Bytes.DerefBytesWriterBase;
-import org.apache.lucene.index.values.ValueType;
+import org.apache.lucene.index.DocValues.Type;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexInput;
@@ -93,7 +93,7 @@ class VarDerefBytesImpl {
   public static class VarDerefReader extends BytesReaderBase {
     private final long totalBytes;
     VarDerefReader(Directory dir, String id, int maxDoc, IOContext context) throws IOException {
-      super(dir, id, CODEC_NAME, VERSION_START, true, context, ValueType.BYTES_VAR_DEREF);
+      super(dir, id, CODEC_NAME, VERSION_START, true, context, Type.BYTES_VAR_DEREF);
       totalBytes = idxIn.readLong();
     }
 
@@ -115,7 +115,7 @@ class VarDerefBytesImpl {
     public VarDerefSource(IndexInput datIn, IndexInput idxIn, long totalBytes)
         throws IOException {
       super(datIn, idxIn, new PagedBytes(PAGED_BYTES_BITS), totalBytes,
-          ValueType.BYTES_VAR_DEREF);
+          Type.BYTES_VAR_DEREF);
       addresses = PackedInts.getReader(idxIn);
     }
 
@@ -130,7 +130,7 @@ class VarDerefBytesImpl {
   final static class DirectVarDerefSource extends DirectSource {
     private final PackedInts.Reader index;
 
-    DirectVarDerefSource(IndexInput data, IndexInput index, ValueType type)
+    DirectVarDerefSource(IndexInput data, IndexInput index, Type type)
         throws IOException {
       super(data, type);
       this.index = PackedInts.getDirectReader(index);

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/VarSortedBytesImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/VarSortedBytesImpl.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/VarSortedBytesImpl.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/VarSortedBytesImpl.java Fri Dec  9 16:43:45 2011
@@ -21,15 +21,15 @@ import java.io.IOException;
 import java.util.Comparator;
 import java.util.List;
 
+import org.apache.lucene.index.DocValues;
+import org.apache.lucene.index.DocValues.SortedSource;
+import org.apache.lucene.index.DocValues.Type;
 import org.apache.lucene.index.MergeState;
 import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesReaderBase;
 import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesSortedSourceBase;
 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.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexInput;
@@ -62,11 +62,11 @@ final class VarSortedBytesImpl {
       size = 0;
     }
     @Override
-    public void merge(MergeState mergeState, IndexDocValues[] docValues)
+    public void merge(MergeState mergeState, DocValues[] docValues)
         throws IOException {
       boolean success = false;
       try {
-        MergeContext ctx = SortedBytesMergeUtils.init(ValueType.BYTES_VAR_SORTED, docValues, comp, mergeState);
+        MergeContext ctx = SortedBytesMergeUtils.init(Type.BYTES_VAR_SORTED, docValues, comp, mergeState);
         final List<SortedSourceSlice> slices = SortedBytesMergeUtils.buildSlices(mergeState, docValues, ctx);
         IndexOutput datOut = getOrCreateDataOut();
         
@@ -149,14 +149,14 @@ final class VarSortedBytesImpl {
     private final Comparator<BytesRef> comparator;
 
     Reader(Directory dir, String id, int maxDoc,
-        IOContext context, ValueType type, Comparator<BytesRef> comparator)
+        IOContext context, Type type, Comparator<BytesRef> comparator)
         throws IOException {
       super(dir, id, CODEC_NAME, VERSION_START, true, context, type);
       this.comparator = comparator;
     }
 
     @Override
-    public org.apache.lucene.index.values.IndexDocValues.Source load()
+    public org.apache.lucene.index.DocValues.Source load()
         throws IOException {
       return new VarSortedSource(cloneData(), cloneIndex(), comparator);
     }
@@ -172,7 +172,7 @@ final class VarSortedBytesImpl {
 
     VarSortedSource(IndexInput datIn, IndexInput idxIn,
         Comparator<BytesRef> comp) throws IOException {
-      super(datIn, idxIn, comp, idxIn.readLong(), ValueType.BYTES_VAR_SORTED, true);
+      super(datIn, idxIn, comp, idxIn.readLong(), Type.BYTES_VAR_SORTED, true);
       valueCount = ordToOffsetIndex.size()-1; // the last value here is just a dummy value to get the length of the last value
       closeIndexInput();
     }
@@ -199,7 +199,7 @@ final class VarSortedBytesImpl {
     private final int valueCount;
     
     DirectSortedSource(IndexInput datIn, IndexInput idxIn,
-        Comparator<BytesRef> comparator, ValueType type) throws IOException {
+        Comparator<BytesRef> comparator, Type type) throws IOException {
       super(type, comparator);
       idxIn.readLong();
       ordToOffsetIndex = PackedInts.getDirectReader(idxIn);

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/VarStraightBytesImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/VarStraightBytesImpl.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/VarStraightBytesImpl.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/VarStraightBytesImpl.java Fri Dec  9 16:43:45 2011
@@ -22,7 +22,7 @@ import java.io.IOException;
 import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesReaderBase;
 import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesSourceBase;
 import org.apache.lucene.index.codecs.lucene40.values.Bytes.BytesWriterBase;
-import org.apache.lucene.index.values.ValueType;
+import org.apache.lucene.index.DocValues.Type;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexInput;
@@ -229,7 +229,7 @@ class VarStraightBytesImpl {
     private final int maxDoc;
 
     VarStraightReader(Directory dir, String id, int maxDoc, IOContext context) throws IOException {
-      super(dir, id, CODEC_NAME, VERSION_START, true, context, ValueType.BYTES_VAR_STRAIGHT);
+      super(dir, id, CODEC_NAME, VERSION_START, true, context, Type.BYTES_VAR_STRAIGHT);
       this.maxDoc = maxDoc;
     }
 
@@ -250,7 +250,7 @@ class VarStraightBytesImpl {
 
     public VarStraightSource(IndexInput datIn, IndexInput idxIn) throws IOException {
       super(datIn, idxIn, new PagedBytes(PAGED_BYTES_BITS), idxIn.readVLong(),
-          ValueType.BYTES_VAR_STRAIGHT);
+          Type.BYTES_VAR_STRAIGHT);
       addresses = PackedInts.getReader(idxIn);
     }
 
@@ -266,7 +266,7 @@ class VarStraightBytesImpl {
 
     private final PackedInts.Reader index;
 
-    DirectVarStraightSource(IndexInput data, IndexInput index, ValueType type)
+    DirectVarStraightSource(IndexInput data, IndexInput index, Type type)
         throws IOException {
       super(data, type);
       index.readVLong();

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Writer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Writer.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Writer.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Writer.java Fri Dec  9 16:43:45 2011
@@ -19,9 +19,9 @@ package org.apache.lucene.index.codecs.l
 import java.io.IOException;
 import java.util.Comparator;
 
+import org.apache.lucene.index.DocValues.Source;
+import org.apache.lucene.index.DocValues.Type;
 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.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.util.Bits;
@@ -165,20 +165,20 @@ public abstract class Writer extends Doc
   /**
    * Factory method to create a {@link Writer} instance for a given type. This
    * method returns default implementations for each of the different types
-   * defined in the {@link ValueType} enumeration.
+   * defined in the {@link Type} enumeration.
    * 
    * @param type
-   *          the {@link ValueType} to create the {@link Writer} for
+   *          the {@link Type} to create the {@link Writer} for
    * @param id
    *          the file name id used to create files within the writer.
    * @param directory
    *          the {@link Directory} to create the files from.
    * @param bytesUsed
    *          a byte-usage tracking reference
-   * @return a new {@link Writer} instance for the given {@link ValueType}
+   * @return a new {@link Writer} instance for the given {@link Type}
    * @throws IOException
    */
-  public static Writer create(ValueType type, String id, Directory directory,
+  public static Writer create(Type type, String id, Directory directory,
       Comparator<BytesRef> comp, Counter bytesUsed, IOContext context) throws IOException {
     if (comp == null) {
       comp = BytesRef.getUTF8SortedAsUnicodeComparator();

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/sep/SepDocValuesProducer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/sep/SepDocValuesProducer.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/sep/SepDocValuesProducer.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/sep/SepDocValuesProducer.java Fri Dec  9 16:43:45 2011
@@ -22,9 +22,9 @@ import java.util.Collection;
 import java.util.Map;
 import java.util.TreeMap;
 
+import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.SegmentReadState;
 import org.apache.lucene.index.codecs.DocValuesReaderBase;
-import org.apache.lucene.index.values.IndexDocValues;
 import org.apache.lucene.util.IOUtils;
 
 /**
@@ -32,18 +32,18 @@ import org.apache.lucene.util.IOUtils;
  * @lucene.experimental
  */
 public class SepDocValuesProducer extends DocValuesReaderBase {
-  private final TreeMap<String, IndexDocValues> docValues;
+  private final TreeMap<String, DocValues> docValues;
 
   /**
    * Creates a new {@link SepDocValuesProducer} instance and loads all
-   * {@link IndexDocValues} instances for this segment and codec.
+   * {@link DocValues} instances for this segment and codec.
    */
   public SepDocValuesProducer(SegmentReadState state) throws IOException {
     docValues = load(state.fieldInfos, state.segmentInfo.name, state.segmentInfo.docCount, state.dir, state.context);
   }
   
   @Override
-  protected Map<String,IndexDocValues> docValues() {
+  protected Map<String,DocValues> docValues() {
     return docValues;
   }
   

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextFieldInfosReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextFieldInfosReader.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextFieldInfosReader.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextFieldInfosReader.java Fri Dec  9 16:43:45 2011
@@ -26,8 +26,8 @@ import org.apache.lucene.index.FieldInfo
 import org.apache.lucene.index.IndexFileNames;
 import org.apache.lucene.index.SegmentInfo;
 import org.apache.lucene.index.FieldInfo.IndexOptions;
+import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.codecs.FieldInfosReader;
-import org.apache.lucene.index.values.ValueType;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexInput;
@@ -98,12 +98,12 @@ public class SimpleTextFieldInfosReader 
         SimpleTextUtil.readLine(input, scratch);
         assert StringHelper.startsWith(scratch, DOCVALUES);
         String dvType = readString(DOCVALUES.length, scratch);
-        final ValueType docValuesType;
+        final DocValues.Type docValuesType;
         
         if ("false".equals(dvType)) {
           docValuesType = null;
         } else {
-          docValuesType = ValueType.valueOf(dvType);
+          docValuesType = DocValues.Type.valueOf(dvType);
         }
         
         SimpleTextUtil.readLine(input, scratch);

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/search/FieldComparator.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/search/FieldComparator.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/search/FieldComparator.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/search/FieldComparator.java Fri Dec  9 16:43:45 2011
@@ -21,11 +21,8 @@ import java.io.IOException;
 import java.util.Comparator;
 
 import org.apache.lucene.index.IndexReader.AtomicReaderContext;
+import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.index.values.IndexDocValues.SortedSource;
-import org.apache.lucene.index.values.IndexDocValues.Source;
-import org.apache.lucene.index.values.IndexDocValues;
-import org.apache.lucene.index.values.ValueType;
 import org.apache.lucene.search.FieldCache.ByteParser;
 import org.apache.lucene.search.FieldCache.DocTerms;
 import org.apache.lucene.search.FieldCache.DocTermsIndex;
@@ -360,7 +357,7 @@ public abstract class FieldComparator<T>
   public static final class FloatDocValuesComparator extends FieldComparator<Double> {
     private final double[] values;
     private final String field;
-    private Source currentReaderValues;
+    private DocValues.Source currentReaderValues;
     private double bottom;
 
     FloatDocValuesComparator(int numHits, String field) {
@@ -400,11 +397,11 @@ public abstract class FieldComparator<T>
 
     @Override
     public FieldComparator setNextReader(AtomicReaderContext context) throws IOException {
-      final IndexDocValues docValues = context.reader.docValues(field);
+      final DocValues docValues = context.reader.docValues(field);
       if (docValues != null) {
         currentReaderValues = docValues.getSource(); 
       } else {
-        currentReaderValues = IndexDocValues.getDefaultSource(ValueType.FLOAT_64);
+        currentReaderValues = DocValues.getDefaultSource(DocValues.Type.FLOAT_64);
       }
       return this;
     }
@@ -648,7 +645,7 @@ public abstract class FieldComparator<T>
   /** Loads int index values and sorts by ascending value. */
   public static final class IntDocValuesComparator extends FieldComparator<Long> {
     private final long[] values;
-    private Source currentReaderValues;
+    private DocValues.Source currentReaderValues;
     private final String field;
     private long bottom;
 
@@ -693,11 +690,11 @@ public abstract class FieldComparator<T>
 
     @Override
     public FieldComparator setNextReader(AtomicReaderContext context) throws IOException {
-      IndexDocValues docValues = context.reader.docValues(field);
+      DocValues docValues = context.reader.docValues(field);
       if (docValues != null) {
         currentReaderValues = docValues.getSource();
       } else {
-        currentReaderValues = IndexDocValues.getDefaultSource(ValueType.FIXED_INTS_64);
+        currentReaderValues = DocValues.getDefaultSource(DocValues.Type.FIXED_INTS_64);
       }
       return this;
     }
@@ -1382,7 +1379,7 @@ public abstract class FieldComparator<T>
 
     /* Current reader's doc ord/values.
        @lucene.internal */
-    SortedSource termsIndex;
+    DocValues.SortedSource termsIndex;
 
     /* Comparator for comparing by value.
        @lucene.internal */
@@ -1490,10 +1487,10 @@ public abstract class FieldComparator<T>
     // Used per-segment when bit width of doc->ord is 8:
     private final class ByteOrdComparator extends PerSegmentComparator {
       private final byte[] readerOrds;
-      private final SortedSource termsIndex;
+      private final DocValues.SortedSource termsIndex;
       private final int docBase;
 
-      public ByteOrdComparator(byte[] readerOrds, SortedSource termsIndex, int docBase) {
+      public ByteOrdComparator(byte[] readerOrds, DocValues.SortedSource termsIndex, int docBase) {
         this.readerOrds = readerOrds;
         this.termsIndex = termsIndex;
         this.docBase = docBase;
@@ -1535,10 +1532,10 @@ public abstract class FieldComparator<T>
     // Used per-segment when bit width of doc->ord is 16:
     private final class ShortOrdComparator extends PerSegmentComparator {
       private final short[] readerOrds;
-      private final SortedSource termsIndex;
+      private final DocValues.SortedSource termsIndex;
       private final int docBase;
 
-      public ShortOrdComparator(short[] readerOrds, SortedSource termsIndex, int docBase) {
+      public ShortOrdComparator(short[] readerOrds, DocValues.SortedSource termsIndex, int docBase) {
         this.readerOrds = readerOrds;
         this.termsIndex = termsIndex;
         this.docBase = docBase;
@@ -1580,10 +1577,10 @@ public abstract class FieldComparator<T>
     // Used per-segment when bit width of doc->ord is 32:
     private final class IntOrdComparator extends PerSegmentComparator {
       private final int[] readerOrds;
-      private final SortedSource termsIndex;
+      private final DocValues.SortedSource termsIndex;
       private final int docBase;
 
-      public IntOrdComparator(int[] readerOrds, SortedSource termsIndex, int docBase) {
+      public IntOrdComparator(int[] readerOrds, DocValues.SortedSource termsIndex, int docBase) {
         this.readerOrds = readerOrds;
         this.termsIndex = termsIndex;
         this.docBase = docBase;
@@ -1709,12 +1706,12 @@ public abstract class FieldComparator<T>
     public FieldComparator setNextReader(AtomicReaderContext context) throws IOException {
       final int docBase = context.docBase;
 
-      final IndexDocValues dv = context.reader.docValues(field);
+      final DocValues dv = context.reader.docValues(field);
       if (dv == null) {
         // This may mean entire segment had no docs with
         // this DV field; use default field value (empty
         // byte[]) in this case:
-        termsIndex = IndexDocValues.getDefaultSortedSource(ValueType.BYTES_VAR_SORTED, context.reader.maxDoc());
+        termsIndex = DocValues.getDefaultSortedSource(DocValues.Type.BYTES_VAR_SORTED, context.reader.maxDoc());
       } else {
         termsIndex = dv.getSource().asSortedSource();
         if (termsIndex == null) {
@@ -1892,7 +1889,7 @@ public abstract class FieldComparator<T>
   public static final class TermValDocValuesComparator extends FieldComparator<BytesRef> {
 
     private BytesRef[] values;
-    private Source docTerms;
+    private DocValues.Source docTerms;
     private final String field;
     private BytesRef bottom;
     private final BytesRef tempBR = new BytesRef();
@@ -1925,11 +1922,11 @@ public abstract class FieldComparator<T>
 
     @Override
     public FieldComparator setNextReader(AtomicReaderContext context) throws IOException {
-      final IndexDocValues dv = context.reader.docValues(field);
+      final DocValues dv = context.reader.docValues(field);
       if (dv != null) {
         docTerms = dv.getSource();
       } else {
-        docTerms = IndexDocValues.getDefaultSource(ValueType.BYTES_VAR_DEREF);
+        docTerms = DocValues.getDefaultSource(DocValues.Type.BYTES_VAR_DEREF);
       }
       return this;
     }

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/search/similarities/Similarity.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/search/similarities/Similarity.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/search/similarities/Similarity.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/search/similarities/Similarity.java Fri Dec  9 16:43:45 2011
@@ -20,7 +20,7 @@ package org.apache.lucene.search.similar
 
 import java.io.IOException;
 
-import org.apache.lucene.document.IndexDocValuesField; // javadoc
+import org.apache.lucene.document.DocValuesField; // javadoc
 import org.apache.lucene.index.FieldInvertState;
 import org.apache.lucene.index.IndexReader; // javadoc
 import org.apache.lucene.index.IndexReader.AtomicReaderContext;
@@ -71,11 +71,11 @@ import org.apache.lucene.util.TermContex
  * <p>
  * Because index-time boost is handled entirely at the application level anyway,
  * an application can alternatively store the index-time boost separately using an 
- * {@link IndexDocValuesField}, and access this at query-time with 
+ * {@link DocValuesField}, and access this at query-time with 
  * {@link IndexReader#docValues(String)}.
  * <p>
  * Finally, using index-time boosts (either via folding into the normalization byte or
- * via IndexDocValues), is an inefficient way to boost the scores of different fields if the
+ * via DocValues), is an inefficient way to boost the scores of different fields if the
  * boost will be the same for every document, instead the Similarity can simply take a constant
  * boost parameter <i>C</i>, and the SimilarityProvider can return different instances with
  * different boosts depending upon field name.

Modified: lucene/dev/branches/lucene3622/lucene/src/test-framework/java/org/apache/lucene/index/RandomIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/test-framework/java/org/apache/lucene/index/RandomIndexWriter.java?rev=1212506&r1=1212505&r2=1212506&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/test-framework/java/org/apache/lucene/index/RandomIndexWriter.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/test-framework/java/org/apache/lucene/index/RandomIndexWriter.java Fri Dec  9 16:43:45 2011
@@ -24,11 +24,11 @@ import java.util.Random;
 
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.MockAnalyzer;
-import org.apache.lucene.document.IndexDocValuesField;
+import org.apache.lucene.document.DocValuesField;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.index.IndexWriter; // javadoc
 import org.apache.lucene.index.codecs.Codec;
-import org.apache.lucene.index.values.ValueType;
+import org.apache.lucene.index.DocValues;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.BytesRef;
@@ -167,12 +167,12 @@ public class RandomIndexWriter implement
   
   private void randomPerDocFieldValues(Random random, Document doc) {
     
-    ValueType[] values = ValueType.values();
-    ValueType type = values[random.nextInt(values.length)];
+    DocValues.Type[] values = DocValues.Type.values();
+    DocValues.Type type = values[random.nextInt(values.length)];
     String name = "random_" + type.name() + "" + docValuesFieldPrefix;
     if ("Lucene3x".equals(codec.getName()) || doc.getField(name) != null)
         return;
-    IndexDocValuesField docValuesField = new IndexDocValuesField(name);
+    DocValuesField docValuesField = new DocValuesField(name);
     switch (type) {
     case BYTES_FIXED_DEREF:
     case BYTES_FIXED_STRAIGHT:



Mime
View raw message