lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1212833 - in /lucene/dev/branches/lucene3622/lucene: contrib/misc/src/java/org/apache/lucene/document/ src/java/org/apache/lucene/document/ src/java/org/apache/lucene/index/ src/java/org/apache/lucene/index/codecs/ src/java/org/apache/luce...
Date Sat, 10 Dec 2011 18:17:34 GMT
Author: rmuir
Date: Sat Dec 10 18:17:34 2011
New Revision: 1212833

URL: http://svn.apache.org/viewvc?rev=1212833&view=rev
Log:
LUCENE-3622: PerFieldDocValues -> DocValue

Added:
    lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/DocValue.java
      - copied, changed from r1212829, lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/PerDocFieldValues.java
Removed:
    lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/PerDocFieldValues.java
Modified:
    lucene/dev/branches/lucene3622/lucene/contrib/misc/src/java/org/apache/lucene/document/LazyDocument.java
    lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/document/DocValuesField.java
    lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/document/Field.java
    lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/DocFieldProcessor.java
    lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/IndexableField.java
    lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesConsumer.java
    lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Bytes.java
    lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Floats.java
    lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Ints.java
    lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/PackedIntValues.java
    lucene/dev/branches/lucene3622/lucene/src/test/org/apache/lucene/index/TestIndexableField.java

Modified: lucene/dev/branches/lucene3622/lucene/contrib/misc/src/java/org/apache/lucene/document/LazyDocument.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/contrib/misc/src/java/org/apache/lucene/document/LazyDocument.java?rev=1212833&r1=1212832&r2=1212833&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/contrib/misc/src/java/org/apache/lucene/document/LazyDocument.java
(original)
+++ lucene/dev/branches/lucene3622/lucene/contrib/misc/src/java/org/apache/lucene/document/LazyDocument.java
Sat Dec 10 18:17:34 2011
@@ -28,7 +28,7 @@ import org.apache.lucene.index.FieldInfo
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.IndexableField;
 import org.apache.lucene.index.IndexableFieldType;
-import org.apache.lucene.index.PerDocFieldValues;
+import org.apache.lucene.index.DocValue;
 import org.apache.lucene.index.DocValues;
 import org.apache.lucene.util.BytesRef;
 
@@ -157,20 +157,20 @@ public class LazyDocument {
     }
 
     @Override
-    public PerDocFieldValues docValues() {
+    public DocValue docValue() {
       if (num == 0) {
-        return getDocument().getField(name).docValues();
+        return getDocument().getField(name).docValue();
       } else {
-        return getDocument().getFields(name)[num].docValues();
+        return getDocument().getFields(name)[num].docValue();
       }
     }
 
     @Override
-    public DocValues.Type docValuesType() {
+    public DocValues.Type docValueType() {
       if (num == 0) {
-        return getDocument().getField(name).docValuesType();
+        return getDocument().getField(name).docValueType();
       } else {
-        return getDocument().getFields(name)[num].docValuesType();
+        return getDocument().getFields(name)[num].docValueType();
       }
     }
 

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/document/DocValuesField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/document/DocValuesField.java?rev=1212833&r1=1212832&r2=1212833&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/document/DocValuesField.java
(original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/document/DocValuesField.java
Sat Dec 10 18:17:34 2011
@@ -20,7 +20,7 @@ import java.io.Reader;
 import java.util.Comparator;
 
 import org.apache.lucene.index.IndexableFieldType;
-import org.apache.lucene.index.PerDocFieldValues;
+import org.apache.lucene.index.DocValue;
 import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.DocValues.Type; // javadocs
 import org.apache.lucene.util.BytesRef;
@@ -69,7 +69,7 @@ import org.apache.lucene.util.BytesRef;
  * </pre>
  * 
  * */
-public class DocValuesField extends Field implements PerDocFieldValues {
+public class DocValuesField extends Field implements DocValue {
 
   protected BytesRef bytes;
   protected double doubleValue;
@@ -94,7 +94,7 @@ public class DocValuesField extends Fiel
   }
 
   @Override
-  public PerDocFieldValues docValues() {
+  public DocValue docValue() {
     return this;
   }
 
@@ -307,7 +307,7 @@ public class DocValuesField extends Fiel
   }
 
   @Override
-  public DocValues.Type docValuesType() {
+  public DocValues.Type docValueType() {
     return type;
   }
 

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/document/Field.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/document/Field.java?rev=1212833&r1=1212832&r2=1212833&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/document/Field.java (original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/document/Field.java Sat
Dec 10 18:17:34 2011
@@ -28,7 +28,7 @@ import org.apache.lucene.analysis.tokena
 import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.IndexableFieldType;
 import org.apache.lucene.index.IndexableField;
-import org.apache.lucene.index.PerDocFieldValues;
+import org.apache.lucene.index.DocValue;
 import org.apache.lucene.util.BytesRef;
 
 /**
@@ -51,7 +51,7 @@ public class Field implements IndexableF
   // pre-analyzed tokenStream for indexed fields
   protected TokenStream tokenStream;
   // length/offset for all primitive types
-  protected PerDocFieldValues docValues;
+  protected DocValue docValue;
   
   protected float boost = 1.0f;
 
@@ -292,17 +292,17 @@ public class Field implements IndexableF
     return result.toString();
   }
   
-  public void setDocValues(PerDocFieldValues docValues) {
-    this.docValues = docValues;
+  public void setDocValue(DocValue docValue) {
+    this.docValue = docValue;
   }
 
   @Override
-  public PerDocFieldValues docValues() {
+  public DocValue docValue() {
     return null;
   }
   
   @Override
-  public DocValues.Type docValuesType() {
+  public DocValues.Type docValueType() {
     return null;
   }
 

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/DocFieldProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/DocFieldProcessor.java?rev=1212833&r1=1212832&r2=1212833&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/DocFieldProcessor.java
(original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/DocFieldProcessor.java
Sat Dec 10 18:17:34 2011
@@ -259,9 +259,9 @@ final class DocFieldProcessor extends Do
       if (field.fieldType().stored()) {
         fieldsWriter.addField(field, fp.fieldInfo);
       }
-      final PerDocFieldValues docValues = field.docValues();
-      if (docValues != null) {
-        docValuesConsumer(field.docValuesType(), docState, fp.fieldInfo).add(docState.docID,
docValues);
+      final DocValue docValue = field.docValue();
+      if (docValue != null) {
+        docValuesConsumer(field.docValueType(), docState, fp.fieldInfo).add(docState.docID,
docValue);
       }
     }
 

Copied: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/DocValue.java
(from r1212829, lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/PerDocFieldValues.java)
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/DocValue.java?p2=lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/DocValue.java&p1=lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/PerDocFieldValues.java&r1=1212829&r2=1212833&rev=1212833&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/PerDocFieldValues.java
(original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/DocValue.java Sat
Dec 10 18:17:34 2011
@@ -30,7 +30,7 @@ import org.apache.lucene.util.BytesRef;
  * 
  * @lucene.experimental
  */
-public interface PerDocFieldValues {
+public interface DocValue {
 
   /**
    * Sets the given <code>long</code> value.
@@ -96,5 +96,5 @@ public interface PerDocFieldValues {
   /**
   * Returns the {@link Type}
   */
-  public DocValues.Type docValuesType();
+  public DocValues.Type docValueType();
 }

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/IndexableField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/IndexableField.java?rev=1212833&r1=1212832&r2=1212833&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/IndexableField.java
(original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/IndexableField.java
Sat Dec 10 18:17:34 2011
@@ -76,10 +76,10 @@ public interface IndexableField {
   public IndexableFieldType fieldType();
   
   /** Non-null if doc values should be indexed */
-  public PerDocFieldValues docValues();
+  public DocValue docValue();
 
-  /** DocValues type; only used if docValues is non-null */
-  public DocValues.Type docValuesType();
+  /** DocValues type; only used if docValue is non-null */
+  public DocValues.Type docValueType();
 
   /**
    * Creates the TokenStream used for indexing this field.  If appropriate,

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=1212833&r1=1212832&r2=1212833&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
Sat Dec 10 18:17:34 2011
@@ -21,14 +21,14 @@ 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.PerDocFieldValues;
+import org.apache.lucene.index.DocValue;
 import org.apache.lucene.util.Bits;
 
 /**
- * Abstract API that consumes {@link PerDocFieldValues}.
+ * Abstract API that consumes {@link DocValue}s.
  * {@link DocValuesConsumer} are always associated with a specific field and
  * segments. Concrete implementations of this API write the given
- * {@link PerDocFieldValues} into a implementation specific format depending on
+ * {@link DocValue} into a implementation specific format depending on
  * the fields meta-data.
  * 
  * @lucene.experimental
@@ -36,28 +36,28 @@ import org.apache.lucene.util.Bits;
 public abstract class DocValuesConsumer {
 
   /**
-   * Adds the given {@link PerDocFieldValues} instance to this
+   * Adds the given {@link DocValue} instance to this
    * {@link DocValuesConsumer}
    * 
    * @param docID
    *          the document ID to add the value for. The docID must always
    *          increase or be <tt>0</tt> if it is the first call to this method.
-   * @param docValues
-   *          the values to add
+   * @param docValue
+   *          the value to add
    * @throws IOException
    *           if an {@link IOException} occurs
    */
-  public abstract void add(int docID, PerDocFieldValues docValues)
+  public abstract void add(int docID, DocValue docValue)
       throws IOException;
 
   /**
    * Called when the consumer of this API is doc with adding
-   * {@link PerDocFieldValues} to this {@link DocValuesConsumer}
+   * {@link DocValue} to this {@link DocValuesConsumer}
    * 
    * @param docCount
    *          the total number of documents in this {@link DocValuesConsumer}.
    *          Must be greater than or equal the last given docID to
-   *          {@link #add(int, PerDocFieldValues)}.
+   *          {@link #add(int, DocValue)}.
    * @throws IOException
    */
   public abstract void finish(int docCount) throws IOException;

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=1212833&r1=1212832&r2=1212833&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
Sat Dec 10 18:17:34 2011
@@ -24,7 +24,7 @@ import java.util.concurrent.atomic.Atomi
 
 import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.IndexFileNames;
-import org.apache.lucene.index.PerDocFieldValues;
+import org.apache.lucene.index.DocValue;
 import org.apache.lucene.index.DocValues.SortedSource;
 import org.apache.lucene.index.DocValues.Source;
 import org.apache.lucene.index.DocValues.Type;
@@ -302,9 +302,9 @@ public final class Bytes {
     }
 
     @Override
-    public void add(int docID, PerDocFieldValues docValues) throws IOException {
+    public void add(int docID, DocValue docValue) throws IOException {
       final BytesRef ref;
-      if ((ref = docValues.getBytes()) != null) {
+      if ((ref = docValue.getBytes()) != null) {
         add(docID, ref);
       }
     }

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=1212833&r1=1212832&r2=1212833&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
Sat Dec 10 18:17:34 2011
@@ -19,7 +19,7 @@ package org.apache.lucene.index.codecs.l
 import java.io.IOException;
 
 import org.apache.lucene.index.DocValues;
-import org.apache.lucene.index.PerDocFieldValues;
+import org.apache.lucene.index.DocValue;
 import org.apache.lucene.index.DocValues.Source;
 import org.apache.lucene.index.DocValues.Type;
 import org.apache.lucene.store.Directory;
@@ -85,8 +85,8 @@ public class Floats {
     }
     
     @Override
-    public void add(int docID, PerDocFieldValues docValues) throws IOException {
-      add(docID, docValues.getFloat());
+    public void add(int docID, DocValue docValue) throws IOException {
+      add(docID, docValue.getFloat());
     }
     
     @Override

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=1212833&r1=1212832&r2=1212833&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
Sat Dec 10 18:17:34 2011
@@ -21,7 +21,7 @@ import java.io.IOException;
 
 import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.DocValues.Type;
-import org.apache.lucene.index.PerDocFieldValues;
+import org.apache.lucene.index.DocValue;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexInput;
@@ -109,8 +109,8 @@ public final class Ints {
     }
 
     @Override
-    public void add(int docID, PerDocFieldValues docValues) throws IOException {
-      add(docID, docValues.getInt());
+    public void add(int docID, DocValue docValue) throws IOException {
+      add(docID, docValue.getInt());
     }
     
     @Override

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=1212833&r1=1212832&r2=1212833&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
Sat Dec 10 18:17:34 2011
@@ -20,7 +20,7 @@ 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.DocValue;
 import org.apache.lucene.index.DocValues.Source;
 import org.apache.lucene.index.DocValues.Type;
 import org.apache.lucene.index.codecs.lucene40.values.FixedStraightBytesImpl.FixedBytesWriterBase;
@@ -151,8 +151,8 @@ class PackedIntValues {
     }
 
     @Override
-    public void add(int docID, PerDocFieldValues docValues) throws IOException {
-      add(docID, docValues.getInt());
+    public void add(int docID, DocValue docValue) throws IOException {
+      add(docID, docValue.getInt());
     }
   }
 

Modified: lucene/dev/branches/lucene3622/lucene/src/test/org/apache/lucene/index/TestIndexableField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/test/org/apache/lucene/index/TestIndexableField.java?rev=1212833&r1=1212832&r2=1212833&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/test/org/apache/lucene/index/TestIndexableField.java
(original)
+++ lucene/dev/branches/lucene3622/lucene/src/test/org/apache/lucene/index/TestIndexableField.java
Sat Dec 10 18:17:34 2011
@@ -156,12 +156,12 @@ public class TestIndexableField extends 
 
     // TODO: randomly enable doc values
     @Override
-    public PerDocFieldValues docValues() {
+    public DocValue docValue() {
       return null;
     }
 
     @Override
-    public DocValues.Type docValuesType() {
+    public DocValues.Type docValueType() {
       return null;
     }
 



Mime
View raw message