lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpou...@apache.org
Subject svn commit: r1652027 [3/3] - in /lucene/dev/branches/branch_5x: ./ lucene/ lucene/benchmark/ lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ lucene/core/ lucene/core/src/java/org/apache/lucene/search/ lucene/core/src/test/org/apache...
Date Thu, 15 Jan 2015 10:11:10 GMT
Modified: lucene/dev/branches/branch_5x/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
Thu Jan 15 10:11:08 2015
@@ -569,11 +569,6 @@ public class MemoryIndex {
           this.scorer = scorer;
         }
 
-        @Override
-        public boolean acceptsDocsOutOfOrder() {
-          return true;
-        }
-
       });
       float score = scores[0];
       return score;

Modified: lucene/dev/branches/branch_5x/lucene/misc/src/java/org/apache/lucene/search/EarlyTerminatingSortingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/misc/src/java/org/apache/lucene/search/EarlyTerminatingSortingCollector.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/misc/src/java/org/apache/lucene/search/EarlyTerminatingSortingCollector.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/misc/src/java/org/apache/lucene/search/EarlyTerminatingSortingCollector.java
Thu Jan 15 10:11:08 2015
@@ -128,11 +128,6 @@ public class EarlyTerminatingSortingColl
           }
         }
 
-        @Override
-        public boolean acceptsDocsOutOfOrder() {
-          return false;
-        }
-
       };
     } else {
       return super.getLeafCollector(context);

Modified: lucene/dev/branches/branch_5x/lucene/misc/src/test/org/apache/lucene/search/TestEarlyTerminatingSortingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/misc/src/test/org/apache/lucene/search/TestEarlyTerminatingSortingCollector.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/misc/src/test/org/apache/lucene/search/TestEarlyTerminatingSortingCollector.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/misc/src/test/org/apache/lucene/search/TestEarlyTerminatingSortingCollector.java
Thu Jan 15 10:11:08 2015
@@ -126,9 +126,8 @@ public class TestEarlyTerminatingSorting
         final boolean fillFields = random().nextBoolean();
         final boolean trackDocScores = random().nextBoolean();
         final boolean trackMaxScore = random().nextBoolean();
-        final boolean inOrder = random().nextBoolean();
-        final TopFieldCollector collector1 = TopFieldCollector.create(sort, numHits, fillFields,
trackDocScores, trackMaxScore, inOrder);
-        final TopFieldCollector collector2 = TopFieldCollector.create(sort, numHits, fillFields,
trackDocScores, trackMaxScore, inOrder);
+        final TopFieldCollector collector1 = TopFieldCollector.create(sort, numHits, fillFields,
trackDocScores, trackMaxScore);
+        final TopFieldCollector collector2 = TopFieldCollector.create(sort, numHits, fillFields,
trackDocScores, trackMaxScore);
 
         final Query query;
         if (random().nextBoolean()) {
@@ -191,9 +190,8 @@ public class TestEarlyTerminatingSorting
       final boolean fillFields = random().nextBoolean();
       final boolean trackDocScores = random().nextBoolean();
       final boolean trackMaxScore = random().nextBoolean();
-      final boolean inOrder = random().nextBoolean();
-      final TopFieldCollector collector1 = TopFieldCollector.create(sort, numHits, fillFields,
trackDocScores, trackMaxScore, inOrder);
-      final TopFieldCollector collector2 = TopFieldCollector.create(sort, numHits, fillFields,
trackDocScores, trackMaxScore, inOrder);
+      final TopFieldCollector collector1 = TopFieldCollector.create(sort, numHits, fillFields,
trackDocScores, trackMaxScore);
+      final TopFieldCollector collector2 = TopFieldCollector.create(sort, numHits, fillFields,
trackDocScores, trackMaxScore);
       
       final Query query;
       if (random().nextBoolean()) {

Modified: lucene/dev/branches/branch_5x/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java
Thu Jan 15 10:11:08 2015
@@ -270,11 +270,6 @@ public class CustomScoreQuery extends Qu
       res.addDetail(new Explanation(queryWeight, "queryWeight"));
       return res;
     }
-
-    @Override
-    public boolean scoresDocsOutOfOrder() {
-      return false;
-    }
     
   }
 

Modified: lucene/dev/branches/branch_5x/lucene/queryparser/src/test/org/apache/lucene/queryparser/surround/query/BooleanQueryTst.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/queryparser/src/test/org/apache/lucene/queryparser/surround/query/BooleanQueryTst.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/queryparser/src/test/org/apache/lucene/queryparser/surround/query/BooleanQueryTst.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/queryparser/src/test/org/apache/lucene/queryparser/surround/query/BooleanQueryTst.java
Thu Jan 15 10:11:08 2015
@@ -72,11 +72,6 @@ public class BooleanQueryTst {
     }
 
     @Override
-    public boolean acceptsDocsOutOfOrder() {
-      return true;
-    }
-
-    @Override
     protected void doSetNextReader(LeafReaderContext context) throws IOException {
       docBase = context.docBase;
     }

Modified: lucene/dev/branches/branch_5x/lucene/sandbox/src/test/org/apache/lucene/search/TestTermAutomatonQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/sandbox/src/test/org/apache/lucene/search/TestTermAutomatonQuery.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/sandbox/src/test/org/apache/lucene/search/TestTermAutomatonQuery.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/sandbox/src/test/org/apache/lucene/search/TestTermAutomatonQuery.java
Thu Jan 15 10:11:08 2015
@@ -290,14 +290,12 @@ public class TestTermAutomatonQuery exte
         private Scorer scorer;
 
         @Override
-        public boolean acceptsDocsOutOfOrder() {
-          return false;
-        }
-
-        @Override
         public void setScorer(Scorer scorer) {
-          assert scorer instanceof TermAutomatonScorer;
           this.scorer = scorer;
+          while (scorer instanceof AssertingScorer) {
+            scorer = ((AssertingScorer) scorer).getIn();
+          }
+          assert scorer instanceof TermAutomatonScorer;
         }
 
         @Override

Modified: lucene/dev/branches/branch_5x/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingInfixSuggester.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingInfixSuggester.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingInfixSuggester.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingInfixSuggester.java
Thu Jan 15 10:11:08 2015
@@ -582,7 +582,7 @@ public class AnalyzingInfixSuggester ext
     //System.out.println("finalQuery=" + query);
 
     // Sort by weight, descending:
-    TopFieldCollector c = TopFieldCollector.create(SORT, num, true, false, false, false);
+    TopFieldCollector c = TopFieldCollector.create(SORT, num, true, false, false);
 
     // We sorted postings by weight during indexing, so we
     // only retrieve the first num hits now:

Modified: lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/AssertingBulkScorer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/AssertingBulkScorer.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/AssertingBulkScorer.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/AssertingBulkScorer.java
Thu Jan 15 10:11:08 2015
@@ -18,21 +18,12 @@ package org.apache.lucene.search;
  */
 
 import java.io.IOException;
-import java.lang.ref.WeakReference;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
 import java.util.Random;
-import java.util.WeakHashMap;
 
 import org.apache.lucene.index.DocsEnum;
-import org.apache.lucene.util.VirtualMethod;
 
 /** Wraps a Scorer with additional checks */
-public class AssertingBulkScorer extends BulkScorer {
-
-  private static final VirtualMethod<BulkScorer> SCORE_COLLECTOR = new VirtualMethod<>(BulkScorer.class,
"score", LeafCollector.class);
-  private static final VirtualMethod<BulkScorer> SCORE_COLLECTOR_RANGE = new VirtualMethod<>(BulkScorer.class,
"score", LeafCollector.class, int.class);
+final class AssertingBulkScorer extends BulkScorer {
 
   public static BulkScorer wrap(Random random, BulkScorer other) {
     if (other == null || other instanceof AssertingBulkScorer) {
@@ -41,10 +32,6 @@ public class AssertingBulkScorer extends
     return new AssertingBulkScorer(random, other);
   }
 
-  public static boolean shouldWrap(BulkScorer inScorer) {
-    return SCORE_COLLECTOR.isOverriddenAsOf(inScorer.getClass()) || SCORE_COLLECTOR_RANGE.isOverriddenAsOf(inScorer.getClass());
-  }
-
   final Random random;
   final BulkScorer in;
 
@@ -59,6 +46,7 @@ public class AssertingBulkScorer extends
 
   @Override
   public void score(LeafCollector collector) throws IOException {
+    collector = new AssertingLeafCollector(random, collector, DocsEnum.NO_MORE_DOCS);
     if (random.nextBoolean()) {
       try {
         final boolean remaining = in.score(collector, DocsEnum.NO_MORE_DOCS);
@@ -73,6 +61,7 @@ public class AssertingBulkScorer extends
 
   @Override
   public boolean score(LeafCollector collector, int max) throws IOException {
+    collector = new AssertingLeafCollector(random, collector, max);
     return in.score(collector, max);
   }
 

Copied: lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/AssertingLeafCollector.java
(from r1652013, lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/search/AssertingLeafCollector.java)
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/AssertingLeafCollector.java?p2=lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/AssertingLeafCollector.java&p1=lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/search/AssertingLeafCollector.java&r1=1652013&r2=1652027&rev=1652027&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/search/AssertingLeafCollector.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/AssertingLeafCollector.java
Thu Jan 15 10:11:08 2015
@@ -21,8 +21,7 @@ import java.io.IOException;
 import java.util.Random;
 
 /** Wraps another Collector and checks that
- *  acceptsDocsOutOfOrder is respected. */
-
+ *  order is respected. */
 final class AssertingLeafCollector extends FilterLeafCollector {
 
   private final Random random;

Modified: lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/AssertingWeight.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/AssertingWeight.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/AssertingWeight.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/AssertingWeight.java
Thu Jan 15 10:11:08 2015
@@ -29,14 +29,12 @@ class AssertingWeight extends Weight {
     return other instanceof AssertingWeight ? other : new AssertingWeight(random, other);
   }
 
-  final boolean scoresDocsOutOfOrder;
   final Random random;
   final Weight in;
 
   AssertingWeight(Random random, Weight in) {
     this.random = random;
     this.in = in;
-    scoresDocsOutOfOrder = in.scoresDocsOutOfOrder() || random.nextBoolean();
   }
 
   @Override
@@ -68,36 +66,12 @@ class AssertingWeight extends Weight {
   }
 
   @Override
-  public BulkScorer bulkScorer(LeafReaderContext context, boolean scoreDocsInOrder, Bits
acceptDocs) throws IOException {
-    // if the caller asks for in-order scoring or if the weight does not support
-    // out-of order scoring then collection will have to happen in-order.
-    BulkScorer inScorer = in.bulkScorer(context, scoreDocsInOrder, acceptDocs);
+  public BulkScorer bulkScorer(LeafReaderContext context, Bits acceptDocs) throws IOException
{
+    BulkScorer inScorer = in.bulkScorer(context, acceptDocs);
     if (inScorer == null) {
       return null;
     }
 
-    if (AssertingBulkScorer.shouldWrap(inScorer)) {
-      // The incoming scorer already has a specialized
-      // implementation for BulkScorer, so we should use it:
-      inScorer = AssertingBulkScorer.wrap(new Random(random.nextLong()), inScorer);
-    } else if (random.nextBoolean()) {
-      // Let super wrap this.scorer instead, so we use
-      // AssertingScorer:
-      inScorer = super.bulkScorer(context, scoreDocsInOrder, acceptDocs);
-    }
-
-    if (scoreDocsInOrder == false && random.nextBoolean()) {
-      // The caller claims it can handle out-of-order
-      // docs; let's confirm that by pulling docs and
-      // randomly shuffling them before collection:
-      inScorer = new AssertingBulkOutOfOrderScorer(new Random(random.nextLong()), inScorer);
-    }
-    return inScorer;
-  }
-
-  @Override
-  public boolean scoresDocsOutOfOrder() {
-    return scoresDocsOutOfOrder;
+    return AssertingBulkScorer.wrap(new Random(random.nextLong()), inScorer);
   }
 }
-

Modified: lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/CheckHits.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/CheckHits.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/CheckHits.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/CheckHits.java
Thu Jan 15 10:11:08 2015
@@ -139,10 +139,6 @@ public class CheckHits {
     protected void doSetNextReader(LeafReaderContext context) throws IOException {
       base = context.docBase;
     }
-    @Override
-    public boolean acceptsDocsOutOfOrder() {
-      return true;
-    }
   }
 
   /**
@@ -511,10 +507,6 @@ public class CheckHits {
     protected void doSetNextReader(LeafReaderContext context) throws IOException {
       base = context.docBase;
     }
-    @Override
-    public boolean acceptsDocsOutOfOrder() {
-      return true;
-    }
   }
 
 }

Modified: lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/QueryUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/QueryUtils.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/QueryUtils.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/QueryUtils.java
Thu Jan 15 10:11:08 2015
@@ -219,7 +219,6 @@ public class QueryUtils {
   public static void checkSkipTo(final Query q, final IndexSearcher s) throws IOException
{
     //System.out.println("Checking "+q);
     final List<LeafReaderContext> readerContextArray = s.getTopReaderContext().leaves();
-    if (s.createNormalizedWeight(q).scoresDocsOutOfOrder()) return;  // in this case order
of skipTo() might differ from that of next().
 
     final int skip_op = 0;
     final int next_op = 1;
@@ -323,11 +322,6 @@ public class QueryUtils {
             this.scorer = null;
             lastDoc[0] = -1;
           }
-
-          @Override
-          public boolean acceptsDocsOutOfOrder() {
-            return false;
-          }
         });
 
         if (lastReader[0] != null) {
@@ -409,10 +403,6 @@ public class QueryUtils {
         lastDoc[0] = -1;
         liveDocs = context.reader().getLiveDocs();
       }
-      @Override
-      public boolean acceptsDocsOutOfOrder() {
-        return false;
-      }
     });
 
     if (lastReader[0] != null) {

Modified: lucene/dev/branches/branch_5x/solr/contrib/analytics/src/java/org/apache/solr/analytics/accumulator/ValueAccumulator.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/contrib/analytics/src/java/org/apache/solr/analytics/accumulator/ValueAccumulator.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/contrib/analytics/src/java/org/apache/solr/analytics/accumulator/ValueAccumulator.java
(original)
+++ lucene/dev/branches/branch_5x/solr/contrib/analytics/src/java/org/apache/solr/analytics/accumulator/ValueAccumulator.java
Thu Jan 15 10:11:08 2015
@@ -38,9 +38,4 @@ public abstract class ValueAccumulator e
     // NOP
   }
 
-  @Override
-  public boolean acceptsDocsOutOfOrder() {
-    return true;
-  }
-
 }

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java
Thu Jan 15 10:11:08 2015
@@ -497,7 +497,7 @@ public class ExpandComponent extends Sea
       DocIdSetIterator iterator = new BitSetIterator(groupBits, 0); // cost is not useful
here
       int group;
       while ((group = iterator.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
-        Collector collector = (sort == null) ? TopScoreDocCollector.create(limit, true) :
TopFieldCollector.create(sort, limit, false, false, false, true);
+        Collector collector = (sort == null) ? TopScoreDocCollector.create(limit) : TopFieldCollector.create(sort,
limit, false, false, false);
         groups.put(group, collector);
       }
 
@@ -549,11 +549,6 @@ public class ExpandComponent extends Sea
             c.collect(docId);
           }
         }
-
-        @Override
-        public boolean acceptsDocsOutOfOrder() {
-          return false;
-        }
       };
     }
 
@@ -579,7 +574,7 @@ public class ExpandComponent extends Sea
       Iterator<LongCursor> iterator = groupSet.iterator();
       while (iterator.hasNext()) {
         LongCursor cursor = iterator.next();
-        Collector collector = (sort == null) ? TopScoreDocCollector.create(limit, true) :
TopFieldCollector.create(sort, limit, false, false, false, true);
+        Collector collector = (sort == null) ? TopScoreDocCollector.create(limit) : TopFieldCollector.create(sort,
limit, false, false, false);
         groups.put(cursor.value, collector);
       }
 
@@ -614,11 +609,6 @@ public class ExpandComponent extends Sea
             c.collect(docId);
           }
         }
-
-        @Override
-        public boolean acceptsDocsOutOfOrder() {
-          return false;
-        }
       };
     }
 

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
Thu Jan 15 10:11:08 2015
@@ -451,12 +451,6 @@ public class CollapsingQParserPlugin ext
     }
 
     @Override
-    public boolean acceptsDocsOutOfOrder() {
-      //Documents must be sent in order to this collector.
-      return false;
-    }
-
-    @Override
     protected void doSetNextReader(LeafReaderContext context) throws IOException {
       this.contexts[context.ord] = context;
       this.docBase = context.docBase;
@@ -666,12 +660,6 @@ public class CollapsingQParserPlugin ext
     }
 
     @Override
-    public boolean acceptsDocsOutOfOrder() {
-      //Documents must be sent in order to this collector.
-      return false;
-    }
-
-    @Override
     protected void doSetNextReader(LeafReaderContext context) throws IOException {
       this.contexts[context.ord] = context;
       this.docBase = context.docBase;

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/DelegatingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/DelegatingCollector.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/DelegatingCollector.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/DelegatingCollector.java
Thu Jan 15 10:11:08 2015
@@ -75,11 +75,6 @@ public class DelegatingCollector extends
     leafDelegate = delegate.getLeafCollector(context);
   }
 
-  @Override
-  public boolean acceptsDocsOutOfOrder() {
-    return leafDelegate.acceptsDocsOutOfOrder();
-  }
-
   public void finish() throws IOException {
     if(delegate instanceof DelegatingCollector) {
       ((DelegatingCollector) delegate).finish();

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/DocSetCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/DocSetCollector.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/DocSetCollector.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/DocSetCollector.java
Thu Jan 15 10:11:08 2015
@@ -87,9 +87,4 @@ public class DocSetCollector extends Sim
   protected void doSetNextReader(LeafReaderContext context) throws IOException {
     this.base = context.docBase;
   }
-
-  @Override
-  public boolean acceptsDocsOutOfOrder() {
-    return false;
-  }
 }

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollector.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollector.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollector.java
Thu Jan 15 10:11:08 2015
@@ -63,16 +63,6 @@ public class EarlyTerminatingCollector e
 
     return new FilterLeafCollector(super.getLeafCollector(context)) {
 
-      /**
-       * This collector requires that docs be collected in order, otherwise
-       * the computed number of scanned docs in the resulting
-       * {@link EarlyTerminatingCollectorException} will be meaningless.
-       */
-      @Override
-      public boolean acceptsDocsOutOfOrder() {
-        return false;
-      }
-
       @Override
       public void collect(int doc) throws IOException {
         super.collect(doc);

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/ExportQParserPlugin.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/ExportQParserPlugin.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/ExportQParserPlugin.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/ExportQParserPlugin.java
Thu Jan 15 10:11:08 2015
@@ -148,11 +148,6 @@ public class ExportQParserPlugin extends
           ++totalHits;
           set.set(docId);
         }
-        
-        @Override
-        public boolean acceptsDocsOutOfOrder() {
-          return false;
-        }
       };
     }
 

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/Grouping.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/Grouping.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/Grouping.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/Grouping.java
Thu Jan 15 10:11:08 2015
@@ -879,9 +879,9 @@ public class Grouping {
     TopDocsCollector newCollector(Sort sort, boolean needScores) throws IOException {
       int groupDocsToCollect = getMax(groupOffset, docsPerGroup, maxDoc);
       if (sort == null || sort == Sort.RELEVANCE) {
-        return TopScoreDocCollector.create(groupDocsToCollect, true);
+        return TopScoreDocCollector.create(groupDocsToCollect);
       } else {
-        return TopFieldCollector.create(searcher.weightSort(sort), groupDocsToCollect, false,
needScores, needScores, true);
+        return TopFieldCollector.create(searcher.weightSort(sort), groupDocsToCollect, false,
needScores, needScores);
       }
     }
 

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/ReRankQParserPlugin.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/ReRankQParserPlugin.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/ReRankQParserPlugin.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/ReRankQParserPlugin.java
Thu Jan 15 10:11:08 2015
@@ -248,10 +248,10 @@ public class ReRankQParserPlugin extends
       this.boostedPriority = boostedPriority;
       Sort sort = cmd.getSort();
       if(sort == null) {
-        this.mainCollector = TopScoreDocCollector.create(Math.max(this.reRankDocs, length),true);
+        this.mainCollector = TopScoreDocCollector.create(Math.max(this.reRankDocs, length));
       } else {
         sort = sort.rewrite(searcher);
-        this.mainCollector = TopFieldCollector.create(sort, Math.max(this.reRankDocs, length),
false, true, true, true);
+        this.mainCollector = TopFieldCollector.create(sort, Math.max(this.reRankDocs, length),
false, true, true);
       }
       this.searcher = searcher;
       this.reRankWeight = reRankWeight;

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
Thu Jan 15 10:11:08 2015
@@ -1596,7 +1596,7 @@ public class SolrIndexSearcher extends I
 
     if (null == cmd.getSort()) {
       assert null == cmd.getCursorMark() : "have cursor but no sort";
-      return TopScoreDocCollector.create(len, true);
+      return TopScoreDocCollector.create(len);
     } else {
       // we have a sort
       final boolean needScores = (cmd.getFlags() & GET_SCORES) != 0;
@@ -1608,7 +1608,7 @@ public class SolrIndexSearcher extends I
       final boolean fillFields = (null != cursor);
       final FieldDoc searchAfter = (null != cursor ? cursor.getSearchAfterFieldDoc() : null);
       return TopFieldCollector.create(weightedSort, len, searchAfter,
-                                      fillFields, needScores, needScores, true); 
+                                      fillFields, needScores, needScores); 
     }
   }
 
@@ -1643,10 +1643,6 @@ public class SolrIndexSearcher extends I
           public void collect(int doc) {
             numHits[0]++;
           }
-          @Override
-          public boolean acceptsDocsOutOfOrder() {
-            return true;
-          }
         };
       } else {
         collector = new SimpleCollector() {
@@ -1661,10 +1657,6 @@ public class SolrIndexSearcher extends I
             float score = scorer.score();
             if (score > topscore[0]) topscore[0]=score;            
           }
-          @Override
-          public boolean acceptsDocsOutOfOrder() {
-            return true;
-          }
         };
       }
       
@@ -1749,11 +1741,6 @@ public class SolrIndexSearcher extends I
             float score = scorer.score();
             if (score > topscore[0]) topscore[0] = score;
           }
-          
-          @Override
-          public boolean acceptsDocsOutOfOrder() {
-            return true;
-          }
         };
         
         collector = MultiCollector.wrap(setCollector, topScoreCollector);

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/QueryCommand.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/QueryCommand.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/QueryCommand.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/QueryCommand.java
Thu Jan 15 10:11:08 2015
@@ -126,9 +126,9 @@ public class QueryCommand implements Com
   @Override
   public List<Collector> create() throws IOException {
     if (sort == null || sort == Sort.RELEVANCE) {
-      collector = TopScoreDocCollector.create(docsToCollect, true);
+      collector = TopScoreDocCollector.create(docsToCollect);
     } else {
-      collector = TopFieldCollector.create(sort, docsToCollect, true, needScores, needScores,
true);
+      collector = TopFieldCollector.create(sort, docsToCollect, true, needScores, needScores);
     }
     filterCollector = new FilterCollector(docSet, collector);
     return Arrays.asList((Collector) filterCollector);

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/TestRankQueryPlugin.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/TestRankQueryPlugin.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/TestRankQueryPlugin.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/TestRankQueryPlugin.java
Thu Jan 15 10:11:08 2015
@@ -785,11 +785,6 @@ public class TestRankQueryPlugin extends
         public void collect(int doc) throws IOException {
           list.add(new ScoreDoc(doc+base, scorer.score()));
         }
-        
-        @Override
-        public boolean acceptsDocsOutOfOrder() {
-          return false;
-        }
       };
     }
 

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/TestSort.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/TestSort.java?rev=1652027&r1=1652026&r2=1652027&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/TestSort.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/TestSort.java
Thu Jan 15 10:11:08 2015
@@ -270,7 +270,7 @@ public class TestSort extends SolrTestCa
         boolean trackScores = r.nextBoolean();
         boolean trackMaxScores = r.nextBoolean();
         boolean scoreInOrder = r.nextBoolean();
-        final TopFieldCollector topCollector = TopFieldCollector.create(sort, top, true,
trackScores, trackMaxScores, scoreInOrder);
+        final TopFieldCollector topCollector = TopFieldCollector.create(sort, top, true,
trackScores, trackMaxScores);
 
         final List<MyDoc> collectedDocs = new ArrayList<>();
         // delegate and collect docs ourselves



Mime
View raw message