lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r1702573 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/core/ solr/core/src/java/org/apache/solr/search/ solr/core/src/java/org/apache/solr/search/DocSetUtil.java
Date Fri, 11 Sep 2015 23:59:20 GMT
Author: yonik
Date: Fri Sep 11 23:59:19 2015
New Revision: 1702573

URL: http://svn.apache.org/r1702573
Log:
SOLR-7918: remove dead code in DocSetUtil

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/DocSetUtil.java

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/DocSetUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/DocSetUtil.java?rev=1702573&r1=1702572&r2=1702573&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/DocSetUtil.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/DocSetUtil.java
Fri Sep 11 23:59:19 2015
@@ -46,43 +46,11 @@ import org.apache.lucene.util.FixedBitSe
 /** @lucene.experimental */
 public class DocSetUtil {
 
-  private static DocSet createDocSetByIterator(SolrIndexSearcher searcher, Filter filter)
throws IOException {
-    int maxDoc = searcher.getIndexReader().maxDoc();
-
-    Map fcontext = null;
-    if (filter instanceof SolrFilter) {
-      fcontext = ValueSource.newContext(searcher);
-      ((SolrFilter) filter).createWeight(fcontext, searcher);
-    }
-
-    DocSetCollector collector = new DocSetCollector((maxDoc >> 6) + 5, maxDoc);
-
-    for (LeafReaderContext readerContext : searcher.getIndexReader().getContext().leaves())
{
-      collector.doSetNextReader(readerContext);
-      Bits acceptDocs = readerContext.reader().getLiveDocs();
-
-      DocIdSet docIdSet = filter instanceof SolrFilter
-          ? ((SolrFilter) filter).getDocIdSet(fcontext, readerContext, acceptDocs)
-          : filter.getDocIdSet(readerContext, acceptDocs);
-
-      if (docIdSet == null) continue;
-      DocIdSetIterator iter = docIdSet.iterator();
-
-      for (;;) {
-        int id = iter.nextDoc();
-        if (id == DocIdSetIterator.NO_MORE_DOCS) {
-          break;
-        }
-        collector.collect(id);
-      }
-
-    }
-
-    return collector.getDocSet();
-
-  }
-
-  private static boolean equals(DocSet a, DocSet b) {
+  /**
+   * Iterates DocSets to test for equality - slow and for testing purposes only.
+   * @lucene.internal
+   */
+  public static boolean equals(DocSet a, DocSet b) {
     DocIterator iter1 = a.iterator();
     DocIterator iter2 = b.iterator();
 



Mime
View raw message