lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1211256 - in /lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index: MultiPerDocValues.java ParallelReader.java codecs/DocValuesConsumer.java codecs/DocValuesReaderBase.java codecs/PerDocValues.java
Date Wed, 07 Dec 2011 01:19:35 GMT
Author: rmuir
Date: Wed Dec  7 01:19:35 2011
New Revision: 1211256

URL: http://svn.apache.org/viewvc?rev=1211256&view=rev
Log:
LUCENE-3622: remove unused PerDocValues.fields(), its not per-doc and duplicated with IR.fieldNames/fieldOptions...
which looks neglected here

Modified:
    lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/MultiPerDocValues.java
    lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/ParallelReader.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/DocValuesReaderBase.java
    lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/PerDocValues.java

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/MultiPerDocValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/MultiPerDocValues.java?rev=1211256&r1=1211255&r2=1211256&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/MultiPerDocValues.java
(original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/MultiPerDocValues.java
Wed Dec  7 01:19:35 2011
@@ -49,15 +49,10 @@ public class MultiPerDocValues extends P
   private final PerDocValues[] subs;
   private final ReaderUtil.Slice[] subSlices;
   private final Map<String, IndexDocValues> docValues = new ConcurrentHashMap<String,
IndexDocValues>();
-  private final TreeSet<String> fields;
 
   public MultiPerDocValues(PerDocValues[] subs, ReaderUtil.Slice[] subSlices) {
     this.subs = subs;
     this.subSlices = subSlices;
-    fields = new TreeSet<String>();
-    for (PerDocValues sub : subs) {
-      fields.addAll(sub.fields());
-    }
   }
 
   /**
@@ -154,9 +149,4 @@ public class MultiPerDocValues extends P
   public void close() throws IOException {
     IOUtils.close(this.subs);
   }
-
-  @Override
-  public Collection<String> fields() {
-    return fields;
-  }
 }

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/ParallelReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/ParallelReader.java?rev=1211256&r1=1211255&r2=1211256&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/ParallelReader.java
(original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/ParallelReader.java
Wed Dec  7 01:19:35 2011
@@ -533,11 +533,6 @@ public class ParallelReader extends Inde
     public IndexDocValues docValues(String field) throws IOException {
       return fields.get(field);
     }
-
-    @Override
-    public Collection<String> fields() {
-      return fields.keySet();
-    }
   }
 }
 

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=1211256&r1=1211255&r2=1211256&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
Wed Dec  7 01:19:35 2011
@@ -114,6 +114,9 @@ public abstract class DocValuesConsumer 
    * @throws IOException
    *           if an {@link IOException} occurs
    */
+  // nocommit: can't we have a default implementation here that merges naively with our apis?
+  // this is how stored fields and term vectors work. its a pain to have to impl merging
+  // (should be an optimization to override it)
   protected abstract void merge(SingleSubMergeState mergeState) throws IOException;
 
   /**

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=1211256&r1=1211255&r2=1211256&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
Wed Dec  7 01:19:35 2011
@@ -53,11 +53,6 @@ public abstract class DocValuesReaderBas
   public IndexDocValues docValues(String field) throws IOException {
     return docValues().get(field);
   }
-
-  @Override
-  public Collection<String> fields() {
-    return docValues().keySet();
-  }
   
   public Comparator<BytesRef> getComparator() throws IOException {
     return BytesRef.getUTF8SortedAsUnicodeComparator();

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/PerDocValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/PerDocValues.java?rev=1211256&r1=1211255&r2=1211256&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/PerDocValues.java
(original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/PerDocValues.java
Wed Dec  7 01:19:35 2011
@@ -17,7 +17,6 @@ package org.apache.lucene.index.codecs;
  */
 import java.io.Closeable;
 import java.io.IOException;
-import java.util.Collection;
 
 import org.apache.lucene.index.values.IndexDocValues;
 
@@ -46,9 +45,4 @@ public abstract class PerDocValues imple
   public abstract IndexDocValues docValues(String field) throws IOException;
 
   public static final PerDocValues[] EMPTY_ARRAY = new PerDocValues[0];
-
-  /**
-   * Returns all fields this {@link PerDocValues} contains values for.
-   */
-  public abstract Collection<String> fields();
 }



Mime
View raw message