You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2015/06/25 19:07:14 UTC

svn commit: r1687581 [9/9] - in /lucene/dev/branches/branch_5x: ./ lucene/ lucene/analysis/common/src/test/org/apache/lucene/analysis/core/ lucene/analysis/common/src/test/org/apache/lucene/analysis/sinks/ lucene/analysis/common/src/test/org/apache/luc...

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/function/FileFloatSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/function/FileFloatSource.java?rev=1687581&r1=1687580&r2=1687581&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/function/FileFloatSource.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/function/FileFloatSource.java Thu Jun 25 17:07:11 2015
@@ -305,7 +305,7 @@ public class FileFloatSource extends Val
           continue;
         }
 
-        postingsEnum = termsEnum.postings(null, postingsEnum, PostingsEnum.NONE);
+        postingsEnum = termsEnum.postings(postingsEnum, PostingsEnum.NONE);
         int doc;
         while ((doc = postingsEnum.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
           vals[doc] = fval;

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/join/IgnoreAcceptDocsQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/join/IgnoreAcceptDocsQuery.java?rev=1687581&r1=1687580&r2=1687581&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/join/IgnoreAcceptDocsQuery.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/join/IgnoreAcceptDocsQuery.java Thu Jun 25 17:07:11 2015
@@ -23,8 +23,10 @@ import java.util.Set;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.LeafReaderContext;
 import org.apache.lucene.index.Term;
+import org.apache.lucene.search.BulkScorer;
 import org.apache.lucene.search.Explanation;
 import org.apache.lucene.search.IndexSearcher;
+import org.apache.lucene.search.LeafCollector;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.Scorer;
 import org.apache.lucene.search.Weight;
@@ -82,8 +84,26 @@ public class IgnoreAcceptDocsQuery exten
     }
 
     @Override
-    public Scorer scorer(LeafReaderContext context, Bits acceptDocs) throws IOException {
-      return w.scorer(context, null);
+    public Scorer scorer(LeafReaderContext context) throws IOException {
+      return w.scorer(context);
+    }
+
+    @Override
+    public BulkScorer bulkScorer(LeafReaderContext context) throws IOException {
+      final BulkScorer in = w.bulkScorer(context);
+      return new BulkScorer() {
+
+        @Override
+        public int score(LeafCollector collector, Bits acceptDocs, int min, int max) throws IOException {
+          return in.score(collector, null, min, max);
+        }
+
+        @Override
+        public long cost() {
+          return in.cost();
+        }
+        
+      };
     }
   }
 

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/update/DeleteByQueryWrapper.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/update/DeleteByQueryWrapper.java?rev=1687581&r1=1687580&r2=1687581&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/update/DeleteByQueryWrapper.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/update/DeleteByQueryWrapper.java Thu Jun 25 17:07:11 2015
@@ -86,8 +86,8 @@ final class DeleteByQueryWrapper extends
       public void normalize(float norm, float topLevelBoost) { inner.normalize(norm, topLevelBoost); }
 
       @Override
-      public Scorer scorer(LeafReaderContext context, Bits acceptDocs) throws IOException {
-        return inner.scorer(privateContext.getIndexReader().leaves().get(0), acceptDocs);
+      public Scorer scorer(LeafReaderContext context) throws IOException {
+        return inner.scorer(privateContext.getIndexReader().leaves().get(0));
       }
     };
   }

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/update/SolrIndexSplitter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/update/SolrIndexSplitter.java?rev=1687581&r1=1687580&r2=1687581&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/update/SolrIndexSplitter.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/update/SolrIndexSplitter.java Thu Jun 25 17:07:11 2015
@@ -42,6 +42,7 @@ import org.apache.solr.common.cloud.DocR
 import org.apache.solr.common.cloud.HashBasedRouter;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.schema.SchemaField;
+import org.apache.solr.search.BitsFilteredPostingsEnum;
 import org.apache.solr.search.SolrIndexSearcher;
 import org.apache.solr.util.RefCounted;
 import org.slf4j.Logger;
@@ -201,7 +202,8 @@ public class SolrIndexSplitter {
         hash = hashRouter.sliceHash(idString, null, null, null);
       }
 
-      postingsEnum = termsEnum.postings(liveDocs, postingsEnum, PostingsEnum.NONE);
+      postingsEnum = termsEnum.postings(postingsEnum, PostingsEnum.NONE);
+      postingsEnum = BitsFilteredPostingsEnum.wrap(postingsEnum, liveDocs);
       for (;;) {
         int doc = postingsEnum.nextDoc();
         if (doc == DocIdSetIterator.NO_MORE_DOCS) break;

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/TestRTGBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/TestRTGBase.java?rev=1687581&r1=1687580&r2=1687581&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/TestRTGBase.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/TestRTGBase.java Thu Jun 25 17:07:11 2015
@@ -132,7 +132,8 @@ public class TestRTGBase extends SolrTes
     if (!termsEnum.seekExact(termBytes)) {
       return -1;
     }
-    PostingsEnum docs = termsEnum.postings(MultiFields.getLiveDocs(r), null, PostingsEnum.NONE);
+    PostingsEnum docs = termsEnum.postings(null, PostingsEnum.NONE);
+    docs = BitsFilteredPostingsEnum.wrap(docs, MultiFields.getLiveDocs(r));
     int id = docs.nextDoc();
     if (id != DocIdSetIterator.NO_MORE_DOCS) {
       int next = docs.nextDoc();