lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1237325 - in /lucene/dev/branches/lucene2858/modules/grouping/src: java/org/apache/lucene/search/grouping/ java/org/apache/lucene/search/grouping/dv/ java/org/apache/lucene/search/grouping/function/ java/org/apache/lucene/search/grouping/t...
Date Sun, 29 Jan 2012 16:24:30 GMT
Author: rmuir
Date: Sun Jan 29 16:24:30 2012
New Revision: 1237325

URL: http://svn.apache.org/viewvc?rev=1237325&view=rev
Log:
LUCENE-2858: fix grouping module

Modified:
    lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/AbstractFirstPassGroupingCollector.java
    lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/AbstractSecondPassGroupingCollector.java
    lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/BlockGroupingCollector.java
    lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVAllGroupHeadsCollector.java
    lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVAllGroupsCollector.java
    lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVFirstPassGroupingCollector.java
    lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVSecondPassGroupingCollector.java
    lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupHeadsCollector.java
    lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupsCollector.java
    lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionFirstPassGroupingCollector.java
    lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionSecondPassGroupingCollector.java
    lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupHeadsCollector.java
    lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupsCollector.java
    lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermFirstPassGroupingCollector.java
    lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermSecondPassGroupingCollector.java
    lucene/dev/branches/lucene2858/modules/grouping/src/test/org/apache/lucene/search/grouping/AllGroupHeadsCollectorTest.java
    lucene/dev/branches/lucene2858/modules/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java

Modified: lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/AbstractFirstPassGroupingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/AbstractFirstPassGroupingCollector.java?rev=1237325&r1=1237324&r2=1237325&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/AbstractFirstPassGroupingCollector.java
(original)
+++ lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/AbstractFirstPassGroupingCollector.java
Sun Jan 29 16:24:30 2012
@@ -17,7 +17,7 @@ package org.apache.lucene.search.groupin
  * limitations under the License.
  */
 
-import org.apache.lucene.index.IndexReader.AtomicReaderContext;
+import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext;
 import org.apache.lucene.search.*;
 
 import java.io.IOException;

Modified: lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/AbstractSecondPassGroupingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/AbstractSecondPassGroupingCollector.java?rev=1237325&r1=1237324&r2=1237325&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/AbstractSecondPassGroupingCollector.java
(original)
+++ lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/AbstractSecondPassGroupingCollector.java
Sun Jan 29 16:24:30 2012
@@ -17,7 +17,7 @@ package org.apache.lucene.search.groupin
  * limitations under the License.
  */
 
-import org.apache.lucene.index.IndexReader.AtomicReaderContext;
+import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext;
 import org.apache.lucene.search.*;
 
 import java.io.IOException;

Modified: lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/BlockGroupingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/BlockGroupingCollector.java?rev=1237325&r1=1237324&r2=1237325&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/BlockGroupingCollector.java
(original)
+++ lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/BlockGroupingCollector.java
Sun Jan 29 16:24:30 2012
@@ -20,7 +20,7 @@ package org.apache.lucene.search.groupin
 
 import java.io.IOException;
 
-import org.apache.lucene.index.IndexReader.AtomicReaderContext;
+import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext;
 import org.apache.lucene.index.IndexWriter;       // javadocs
 import org.apache.lucene.search.Collector;
 import org.apache.lucene.search.DocIdSetIterator;
@@ -505,7 +505,7 @@ public class BlockGroupingCollector exte
     subDocUpto = 0;
     docBase = readerContext.docBase;
     //System.out.println("setNextReader base=" + docBase + " r=" + readerContext.reader);
-    lastDocPerGroupBits = lastDocPerGroup.getDocIdSet(readerContext, readerContext.reader.getLiveDocs()).iterator();
+    lastDocPerGroupBits = lastDocPerGroup.getDocIdSet(readerContext, readerContext.reader().getLiveDocs()).iterator();
     groupEndDocID = -1;
 
     currentReaderContext = readerContext;

Modified: lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVAllGroupHeadsCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVAllGroupHeadsCollector.java?rev=1237325&r1=1237324&r2=1237325&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVAllGroupHeadsCollector.java
(original)
+++ lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVAllGroupHeadsCollector.java
Sun Jan 29 16:24:30 2012
@@ -17,6 +17,7 @@ package org.apache.lucene.search.groupin
  * limitations under the License.
  */
 
+import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext;
 import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.DocValues.Type; // javadocs
 import org.apache.lucene.index.IndexReader;
@@ -43,7 +44,7 @@ public abstract class DVAllGroupHeadsCol
   final DocValues.Type valueType;
   final BytesRef scratchBytesRef = new BytesRef();
 
-  IndexReader.AtomicReaderContext readerContext;
+  AtomicReaderContext readerContext;
   Scorer scorer;
 
   DVAllGroupHeadsCollector(String groupField, DocValues.Type valueType, int numberOfSorts,
boolean diskResident) {
@@ -91,10 +92,10 @@ public abstract class DVAllGroupHeadsCol
   static class GroupHead extends AbstractAllGroupHeadsCollector.GroupHead<Comparable>
{
 
     final FieldComparator[] comparators;
-    IndexReader.AtomicReaderContext readerContext;
+    AtomicReaderContext readerContext;
     Scorer scorer;
 
-    GroupHead(Comparable groupValue, Sort sort, int doc, IndexReader.AtomicReaderContext
readerContext, Scorer scorer) throws IOException {
+    GroupHead(Comparable groupValue, Sort sort, int doc, AtomicReaderContext readerContext,
Scorer scorer) throws IOException {
       super(groupValue, doc + readerContext.docBase);
       final SortField[] sortFields = sort.getSort();
       comparators = new FieldComparator[sortFields.length];
@@ -123,10 +124,10 @@ public abstract class DVAllGroupHeadsCol
   }
 
   @Override
-  public void setNextReader(IndexReader.AtomicReaderContext readerContext) throws IOException
{
+  public void setNextReader(AtomicReaderContext readerContext) throws IOException {
     this.readerContext = readerContext;
 
-    final DocValues dv = readerContext.reader.docValues(groupField);
+    final DocValues dv = readerContext.reader().docValues(groupField);
     final DocValues.Source dvSource;
     if (dv != null) {
       dvSource = diskResident ? dv.getDirectSource() : dv.getSource();
@@ -147,7 +148,7 @@ public abstract class DVAllGroupHeadsCol
    * @return The default source when no doc values are available.
    * @param readerContext The current reader context
    */
-  protected DocValues.Source getDefaultSource(IndexReader.AtomicReaderContext readerContext)
{
+  protected DocValues.Source getDefaultSource(AtomicReaderContext readerContext) {
     return DocValues.getDefaultSource(valueType);
   }
 
@@ -189,7 +190,7 @@ public abstract class DVAllGroupHeadsCol
       return groups.values();
     }
 
-    public void setNextReader(IndexReader.AtomicReaderContext context) throws IOException
{
+    public void setNextReader(AtomicReaderContext context) throws IOException {
       super.setNextReader(context);
       for (GroupHead groupHead : groups.values()) {
         for (int i = 0; i < groupHead.comparators.length; i++) {
@@ -230,8 +231,8 @@ public abstract class DVAllGroupHeadsCol
       }
 
       @Override
-      protected DocValues.Source getDefaultSource(IndexReader.AtomicReaderContext readerContext)
{
-        return DocValues.getDefaultSortedSource(valueType, readerContext.reader.maxDoc());
+      protected DocValues.Source getDefaultSource(AtomicReaderContext readerContext) {
+        return DocValues.getDefaultSortedSource(valueType, readerContext.reader().maxDoc());
       }
     }
 

Modified: lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVAllGroupsCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVAllGroupsCollector.java?rev=1237325&r1=1237324&r2=1237325&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVAllGroupsCollector.java
(original)
+++ lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVAllGroupsCollector.java
Sun Jan 29 16:24:30 2012
@@ -17,6 +17,7 @@ package org.apache.lucene.search.groupin
  * limitations under the License.
  */
 
+import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext;
 import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.DocValues.Type; // javadocs
 import org.apache.lucene.index.IndexReader;
@@ -104,8 +105,8 @@ public abstract class DVAllGroupsCollect
   }
 
   @Override
-  public void setNextReader(IndexReader.AtomicReaderContext readerContext) throws IOException
{
-    final DocValues dv = readerContext.reader.docValues(groupField);
+  public void setNextReader(AtomicReaderContext readerContext) throws IOException {
+    final DocValues dv = readerContext.reader().docValues(groupField);
     final DocValues.Source dvSource;
     if (dv != null) {
       dvSource = diskResident ? dv.getDirectSource() : dv.getSource();
@@ -121,13 +122,13 @@ public abstract class DVAllGroupsCollect
    * @param source The idv source to be used by concrete implementations
    * @param readerContext The current reader context
    */
-  protected abstract void setDocValuesSources(DocValues.Source source, IndexReader.AtomicReaderContext
readerContext);
+  protected abstract void setDocValuesSources(DocValues.Source source, AtomicReaderContext
readerContext);
 
   /**
    * @return The default source when no doc values are available.
    * @param readerContext The current reader context
    */
-  protected DocValues.Source getDefaultSource(IndexReader.AtomicReaderContext readerContext)
{
+  protected DocValues.Source getDefaultSource(AtomicReaderContext readerContext) {
     return DocValues.getDefaultSource(valueType);
   }
 
@@ -150,7 +151,7 @@ public abstract class DVAllGroupsCollect
       return groups;
     }
 
-    protected void setDocValuesSources(DocValues.Source source, IndexReader.AtomicReaderContext
readerContext) {
+    protected void setDocValuesSources(DocValues.Source source, AtomicReaderContext readerContext)
{
       this.source = source;
     }
 
@@ -175,7 +176,7 @@ public abstract class DVAllGroupsCollect
       return groups;
     }
 
-    protected void setDocValuesSources(DocValues.Source source, IndexReader.AtomicReaderContext
readerContext) {
+    protected void setDocValuesSources(DocValues.Source source, AtomicReaderContext readerContext)
{
       this.source = source;
     }
 
@@ -202,7 +203,7 @@ public abstract class DVAllGroupsCollect
       return groups;
     }
 
-    protected void setDocValuesSources(DocValues.Source source, IndexReader.AtomicReaderContext
readerContext) {
+    protected void setDocValuesSources(DocValues.Source source, AtomicReaderContext readerContext)
{
       this.source = source;
     }
 
@@ -233,7 +234,7 @@ public abstract class DVAllGroupsCollect
       return groups;
     }
 
-    protected void setDocValuesSources(DocValues.Source source, IndexReader.AtomicReaderContext
readerContext) {
+    protected void setDocValuesSources(DocValues.Source source, AtomicReaderContext readerContext)
{
       this.source = source.asSortedSource();
 
       ordSet.clear();
@@ -246,8 +247,8 @@ public abstract class DVAllGroupsCollect
     }
 
     @Override
-    protected DocValues.Source getDefaultSource(IndexReader.AtomicReaderContext readerContext)
{
-      return DocValues.getDefaultSortedSource(valueType, readerContext.reader.maxDoc());
+    protected DocValues.Source getDefaultSource(AtomicReaderContext readerContext) {
+      return DocValues.getDefaultSortedSource(valueType, readerContext.reader().maxDoc());
     }
 
   }

Modified: lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVFirstPassGroupingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVFirstPassGroupingCollector.java?rev=1237325&r1=1237324&r2=1237325&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVFirstPassGroupingCollector.java
(original)
+++ lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVFirstPassGroupingCollector.java
Sun Jan 29 16:24:30 2012
@@ -17,6 +17,7 @@ package org.apache.lucene.search.groupin
  * limitations under the License.
  */
 
+import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext;
 import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.DocValues.Type; // javadocs
 import org.apache.lucene.index.IndexReader;
@@ -69,10 +70,10 @@ public abstract class DVFirstPassGroupin
   }
 
   @Override
-  public void setNextReader(IndexReader.AtomicReaderContext readerContext) throws IOException
{
+  public void setNextReader(AtomicReaderContext readerContext) throws IOException {
     super.setNextReader(readerContext);
 
-    final DocValues dv = readerContext.reader.docValues(groupField);
+    final DocValues dv = readerContext.reader().docValues(groupField);
     final DocValues.Source dvSource;
     if (dv != null) {
       dvSource = diskResident ? dv.getDirectSource() : dv.getSource();
@@ -93,7 +94,7 @@ public abstract class DVFirstPassGroupin
    * @return The default source when no doc values are available.
    * @param readerContext The current reader context
    */
-  protected DocValues.Source getDefaultSource(IndexReader.AtomicReaderContext readerContext)
{
+  protected DocValues.Source getDefaultSource(AtomicReaderContext readerContext) {
     return DocValues.getDefaultSource(valueType);
   }
 
@@ -197,8 +198,8 @@ public abstract class DVFirstPassGroupin
     }
 
     @Override
-    protected DocValues.Source getDefaultSource(IndexReader.AtomicReaderContext readerContext)
{
-      return DocValues.getDefaultSortedSource(valueType, readerContext.reader.maxDoc());
+    protected DocValues.Source getDefaultSource(AtomicReaderContext readerContext) {
+      return DocValues.getDefaultSortedSource(valueType, readerContext.reader().maxDoc());
     }
   }
 

Modified: lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVSecondPassGroupingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVSecondPassGroupingCollector.java?rev=1237325&r1=1237324&r2=1237325&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVSecondPassGroupingCollector.java
(original)
+++ lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/dv/DVSecondPassGroupingCollector.java
Sun Jan 29 16:24:30 2012
@@ -17,6 +17,7 @@ package org.apache.lucene.search.groupin
  * limitations under the License.
  */
 
+import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext;
 import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.DocValues.Type; // javadocs
 import org.apache.lucene.index.IndexReader;
@@ -103,10 +104,10 @@ public abstract class DVSecondPassGroupi
   }
 
   @Override
-  public void setNextReader(IndexReader.AtomicReaderContext readerContext) throws IOException
{
+  public void setNextReader(AtomicReaderContext readerContext) throws IOException {
     super.setNextReader(readerContext);
 
-    final DocValues dv = readerContext.reader.docValues(groupField);
+    final DocValues dv = readerContext.reader().docValues(groupField);
     final DocValues.Source dvSource;
     if (dv != null) {
       dvSource = diskResident ? dv.getDirectSource() : dv.getSource();
@@ -122,13 +123,13 @@ public abstract class DVSecondPassGroupi
    * @param source The idv source to be used by concrete implementations
    * @param readerContext The current reader context
    */
-  protected abstract void setDocValuesSources(DocValues.Source source, IndexReader.AtomicReaderContext
readerContext);
+  protected abstract void setDocValuesSources(DocValues.Source source, AtomicReaderContext
readerContext);
 
   /**
    * @return The default source when no doc values are available.
    * @param readerContext The current reader context
    */
-  protected DocValues.Source getDefaultSource(IndexReader.AtomicReaderContext readerContext)
{
+  protected DocValues.Source getDefaultSource(AtomicReaderContext readerContext) {
     return DocValues.getDefaultSource(valueType);
   }
 
@@ -144,7 +145,7 @@ public abstract class DVSecondPassGroupi
       return groupMap.get(source.getInt(doc));
     }
 
-    protected void setDocValuesSources(DocValues.Source source, IndexReader.AtomicReaderContext
readerContext) {
+    protected void setDocValuesSources(DocValues.Source source, AtomicReaderContext readerContext)
{
       this.source = source;
     }
   }
@@ -161,7 +162,7 @@ public abstract class DVSecondPassGroupi
       return groupMap.get(source.getFloat(doc));
     }
 
-    protected void setDocValuesSources(DocValues.Source source, IndexReader.AtomicReaderContext
readerContext) {
+    protected void setDocValuesSources(DocValues.Source source, AtomicReaderContext readerContext)
{
       this.source = source;
     }
   }
@@ -180,7 +181,7 @@ public abstract class DVSecondPassGroupi
     }
 
     @Override
-    protected void setDocValuesSources(DocValues.Source source, IndexReader.AtomicReaderContext
readerContext) {
+    protected void setDocValuesSources(DocValues.Source source, AtomicReaderContext readerContext)
{
       this.source = source;
     }
 
@@ -209,7 +210,7 @@ public abstract class DVSecondPassGroupi
     }
 
     @Override
-    protected void setDocValuesSources(DocValues.Source source, IndexReader.AtomicReaderContext
readerContext) {
+    protected void setDocValuesSources(DocValues.Source source, AtomicReaderContext readerContext)
{
       this.source = source.asSortedSource();
 
       ordSet.clear();
@@ -222,8 +223,8 @@ public abstract class DVSecondPassGroupi
     }
 
     @Override
-    protected DocValues.Source getDefaultSource(IndexReader.AtomicReaderContext readerContext)
{
-      return DocValues.getDefaultSortedSource(valueType, readerContext.reader.maxDoc());
+    protected DocValues.Source getDefaultSource(AtomicReaderContext readerContext) {
+      return DocValues.getDefaultSortedSource(valueType, readerContext.reader().maxDoc());
     }
   }
 

Modified: lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupHeadsCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupHeadsCollector.java?rev=1237325&r1=1237324&r2=1237325&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupHeadsCollector.java
(original)
+++ lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupHeadsCollector.java
Sun Jan 29 16:24:30 2012
@@ -17,6 +17,7 @@ package org.apache.lucene.search.groupin
  * limitations under the License.
  */
 
+import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.queries.function.FunctionValues;
 import org.apache.lucene.queries.function.ValueSource;
@@ -47,7 +48,7 @@ public class FunctionAllGroupHeadsCollec
 
   private FunctionValues.ValueFiller filler;
   private MutableValue mval;
-  private IndexReader.AtomicReaderContext readerContext;
+  private AtomicReaderContext readerContext;
   private Scorer scorer;
 
   /**
@@ -103,7 +104,7 @@ public class FunctionAllGroupHeadsCollec
     }
   }
 
-  public void setNextReader(IndexReader.AtomicReaderContext context) throws IOException {
+  public void setNextReader(AtomicReaderContext context) throws IOException {
     this.readerContext = context;
     FunctionValues docValues = groupBy.getValues(vsContext, context);
     filler = docValues.getValueFiller();

Modified: lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupsCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupsCollector.java?rev=1237325&r1=1237324&r2=1237325&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupsCollector.java
(original)
+++ lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupsCollector.java
Sun Jan 29 16:24:30 2012
@@ -17,6 +17,7 @@ package org.apache.lucene.search.groupin
  * limitations under the License.
  */
 
+import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.queries.function.FunctionValues;
 import org.apache.lucene.queries.function.ValueSource;
@@ -78,7 +79,7 @@ public class FunctionAllGroupsCollector 
   /**
    * {@inheritDoc}
    */
-  public void setNextReader(IndexReader.AtomicReaderContext context) throws IOException {
+  public void setNextReader(AtomicReaderContext context) throws IOException {
     FunctionValues docValues = groupBy.getValues(vsContext, context);
     filler = docValues.getValueFiller();
     mval = filler.getValue();

Modified: lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionFirstPassGroupingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionFirstPassGroupingCollector.java?rev=1237325&r1=1237324&r2=1237325&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionFirstPassGroupingCollector.java
(original)
+++ lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionFirstPassGroupingCollector.java
Sun Jan 29 16:24:30 2012
@@ -17,6 +17,7 @@ package org.apache.lucene.search.groupin
  * limitations under the License.
  */
 
+import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.queries.function.FunctionValues;
 import org.apache.lucene.queries.function.ValueSource;
@@ -78,7 +79,7 @@ public class FunctionFirstPassGroupingCo
   }
 
   @Override
-  public void setNextReader(IndexReader.AtomicReaderContext readerContext) throws IOException
{
+  public void setNextReader(AtomicReaderContext readerContext) throws IOException {
     super.setNextReader(readerContext);
     docValues = groupByVS.getValues(vsContext, readerContext);
     filler = docValues.getValueFiller();

Modified: lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionSecondPassGroupingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionSecondPassGroupingCollector.java?rev=1237325&r1=1237324&r2=1237325&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionSecondPassGroupingCollector.java
(original)
+++ lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionSecondPassGroupingCollector.java
Sun Jan 29 16:24:30 2012
@@ -17,6 +17,7 @@ package org.apache.lucene.search.groupin
  * limitations under the License.
  */
 
+import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.queries.function.FunctionValues;
 import org.apache.lucene.queries.function.ValueSource;
@@ -75,7 +76,7 @@ public class FunctionSecondPassGroupingC
   /**
    * {@inheritDoc}
    */
-  public void setNextReader(IndexReader.AtomicReaderContext readerContext) throws IOException
{
+  public void setNextReader(AtomicReaderContext readerContext) throws IOException {
     super.setNextReader(readerContext);
     FunctionValues docValues = groupByVS.getValues(vsContext, readerContext);
     filler = docValues.getValueFiller();

Modified: lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupHeadsCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupHeadsCollector.java?rev=1237325&r1=1237324&r2=1237325&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupHeadsCollector.java
(original)
+++ lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupHeadsCollector.java
Sun Jan 29 16:24:30 2012
@@ -17,6 +17,7 @@ package org.apache.lucene.search.groupin
  * limitations under the License.
  */
 
+import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.search.*;
 import org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector;
@@ -41,7 +42,7 @@ public abstract class TermAllGroupHeadsC
   final BytesRef scratchBytesRef = new BytesRef();
 
   FieldCache.DocTermsIndex groupIndex;
-  IndexReader.AtomicReaderContext readerContext;
+  AtomicReaderContext readerContext;
 
   protected TermAllGroupHeadsCollector(String groupField, int numberOfSorts) {
     super(numberOfSorts);
@@ -142,9 +143,9 @@ public abstract class TermAllGroupHeadsC
       return groups.values();
     }
 
-    public void setNextReader(IndexReader.AtomicReaderContext context) throws IOException
{
+    public void setNextReader(AtomicReaderContext context) throws IOException {
       this.readerContext = context;
-      groupIndex = FieldCache.DEFAULT.getTermsIndex(context.reader, groupField);
+      groupIndex = FieldCache.DEFAULT.getTermsIndex(context.reader(), groupField);
 
       for (GroupHead groupHead : groups.values()) {
         for (int i = 0; i < groupHead.comparators.length; i++) {
@@ -243,15 +244,15 @@ public abstract class TermAllGroupHeadsC
       temporalResult.groupHead = groupHead;
     }
 
-    public void setNextReader(IndexReader.AtomicReaderContext context) throws IOException
{
+    public void setNextReader(AtomicReaderContext context) throws IOException {
       this.readerContext = context;
-      groupIndex = FieldCache.DEFAULT.getTermsIndex(context.reader, groupField);
+      groupIndex = FieldCache.DEFAULT.getTermsIndex(context.reader(), groupField);
       for (int i = 0; i < fields.length; i++) {
         if (fields[i].getType() == SortField.Type.SCORE) {
           continue;
         }
 
-        sortsIndex[i] = FieldCache.DEFAULT.getTermsIndex(context.reader, fields[i].getField());
+        sortsIndex[i] = FieldCache.DEFAULT.getTermsIndex(context.reader(), fields[i].getField());
       }
 
       // Clear ordSet and fill it with previous encountered groups that can occur in the
current segment.
@@ -380,11 +381,11 @@ public abstract class TermAllGroupHeadsC
       temporalResult.groupHead = groupHead;
     }
 
-    public void setNextReader(IndexReader.AtomicReaderContext context) throws IOException
{
+    public void setNextReader(AtomicReaderContext context) throws IOException {
       this.readerContext = context;
-      groupIndex = FieldCache.DEFAULT.getTermsIndex(context.reader, groupField);
+      groupIndex = FieldCache.DEFAULT.getTermsIndex(context.reader(), groupField);
       for (int i = 0; i < fields.length; i++) {
-        sortsIndex[i] = FieldCache.DEFAULT.getTermsIndex(context.reader, fields[i].getField());
+        sortsIndex[i] = FieldCache.DEFAULT.getTermsIndex(context.reader(), fields[i].getField());
       }
 
       // Clear ordSet and fill it with previous encountered groups that can occur in the
current segment.
@@ -488,9 +489,9 @@ public abstract class TermAllGroupHeadsC
       temporalResult.groupHead = groupHead;
     }
 
-    public void setNextReader(IndexReader.AtomicReaderContext context) throws IOException
{
+    public void setNextReader(AtomicReaderContext context) throws IOException {
       this.readerContext = context;
-      groupIndex = FieldCache.DEFAULT.getTermsIndex(context.reader, groupField);
+      groupIndex = FieldCache.DEFAULT.getTermsIndex(context.reader(), groupField);
 
       // Clear ordSet and fill it with previous encountered groups that can occur in the
current segment.
       ordSet.clear();

Modified: lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupsCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupsCollector.java?rev=1237325&r1=1237324&r2=1237325&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupsCollector.java
(original)
+++ lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupsCollector.java
Sun Jan 29 16:24:30 2012
@@ -17,6 +17,7 @@ package org.apache.lucene.search.groupin
  * limitations under the License.
  */
 
+import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.search.FieldCache;
 import org.apache.lucene.search.grouping.AbstractAllGroupsCollector;
@@ -97,8 +98,8 @@ public class TermAllGroupsCollector exte
     return groups;
   }
 
-  public void setNextReader(IndexReader.AtomicReaderContext context) throws IOException {
-    index = FieldCache.DEFAULT.getTermsIndex(context.reader, groupField);
+  public void setNextReader(AtomicReaderContext context) throws IOException {
+    index = FieldCache.DEFAULT.getTermsIndex(context.reader(), groupField);
 
     // Clear ordSet and fill it with previous encountered groups that can occur in the current
segment.
     ordSet.clear();

Modified: lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermFirstPassGroupingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermFirstPassGroupingCollector.java?rev=1237325&r1=1237324&r2=1237325&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermFirstPassGroupingCollector.java
(original)
+++ lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermFirstPassGroupingCollector.java
Sun Jan 29 16:24:30 2012
@@ -17,7 +17,7 @@ package org.apache.lucene.search.groupin
  * limitations under the License.
  */
 
-import org.apache.lucene.index.IndexReader.AtomicReaderContext;
+import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext;
 import org.apache.lucene.search.FieldCache;
 import org.apache.lucene.search.Sort;
 import org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector;
@@ -81,6 +81,6 @@ public class TermFirstPassGroupingCollec
   @Override
   public void setNextReader(AtomicReaderContext readerContext) throws IOException {
     super.setNextReader(readerContext);
-    index = FieldCache.DEFAULT.getTermsIndex(readerContext.reader, groupField);
+    index = FieldCache.DEFAULT.getTermsIndex(readerContext.reader(), groupField);
   }
 }

Modified: lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermSecondPassGroupingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermSecondPassGroupingCollector.java?rev=1237325&r1=1237324&r2=1237325&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermSecondPassGroupingCollector.java
(original)
+++ lucene/dev/branches/lucene2858/modules/grouping/src/java/org/apache/lucene/search/grouping/term/TermSecondPassGroupingCollector.java
Sun Jan 29 16:24:30 2012
@@ -17,7 +17,7 @@ package org.apache.lucene.search.groupin
  * limitations under the License.
  */
 
-import org.apache.lucene.index.IndexReader.AtomicReaderContext;
+import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext;
 import org.apache.lucene.search.FieldCache;
 import org.apache.lucene.search.Sort;
 import org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector;
@@ -55,7 +55,7 @@ public class TermSecondPassGroupingColle
   @Override
   public void setNextReader(AtomicReaderContext readerContext) throws IOException {
     super.setNextReader(readerContext);
-    index = FieldCache.DEFAULT.getTermsIndex(readerContext.reader, groupField);
+    index = FieldCache.DEFAULT.getTermsIndex(readerContext.reader(), groupField);
 
     // Rebuild ordSet
     ordSet.clear();

Modified: lucene/dev/branches/lucene2858/modules/grouping/src/test/org/apache/lucene/search/grouping/AllGroupHeadsCollectorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/modules/grouping/src/test/org/apache/lucene/search/grouping/AllGroupHeadsCollectorTest.java?rev=1237325&r1=1237324&r2=1237325&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/modules/grouping/src/test/org/apache/lucene/search/grouping/AllGroupHeadsCollectorTest.java
(original)
+++ lucene/dev/branches/lucene2858/modules/grouping/src/test/org/apache/lucene/search/grouping/AllGroupHeadsCollectorTest.java
Sun Jan 29 16:24:30 2012
@@ -19,9 +19,10 @@ package org.apache.lucene.search.groupin
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.*;
+import org.apache.lucene.index.DirectoryReader;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.RandomIndexWriter;
-import org.apache.lucene.index.SlowMultiReaderWrapper;
+import org.apache.lucene.index.SlowCompositeReaderWrapper;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.DocValues.Type;
 import org.apache.lucene.queries.function.ValueSource;
@@ -113,7 +114,7 @@ public class AllGroupHeadsCollectorTest 
 
     IndexReader reader = w.getReader();
     IndexSearcher indexSearcher = new IndexSearcher(reader);
-    if (SlowMultiReaderWrapper.class.isAssignableFrom(reader.getClass())) {
+    if (SlowCompositeReaderWrapper.class.isAssignableFrom(reader.getClass())) {
       canUseIDV = false;
     }
 
@@ -272,11 +273,11 @@ public class AllGroupHeadsCollectorTest 
         }
       }
 
-      final IndexReader r = w.getReader();
+      final DirectoryReader r = w.getReader();
       w.close();
 
       // NOTE: intentional but temporary field cache insanity!
-      final int[] docIdToFieldId = FieldCache.DEFAULT.getInts(new SlowMultiReaderWrapper(r),
"id", false);
+      final int[] docIdToFieldId = FieldCache.DEFAULT.getInts(new SlowCompositeReaderWrapper(r),
"id", false);
       final int[] fieldIdToDocID = new int[numDocs];
       for (int i = 0; i < docIdToFieldId.length; i++) {
         int fieldId = docIdToFieldId[i];
@@ -285,7 +286,7 @@ public class AllGroupHeadsCollectorTest 
 
       try {
         final IndexSearcher s = newSearcher(r);
-        if (SlowMultiReaderWrapper.class.isAssignableFrom(s.getIndexReader().getClass()))
{
+        if (SlowCompositeReaderWrapper.class.isAssignableFrom(s.getIndexReader().getClass()))
{
           canUseIDV = false;
         } else {
           canUseIDV = !preFlex;
@@ -365,7 +366,7 @@ public class AllGroupHeadsCollectorTest 
           }
         }
       } finally {
-        FieldCache.DEFAULT.purge(r);
+        // nocommit FieldCache.DEFAULT.purge(r);
       }
 
       r.close();

Modified: lucene/dev/branches/lucene2858/modules/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/modules/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java?rev=1237325&r1=1237324&r2=1237325&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/modules/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java
(original)
+++ lucene/dev/branches/lucene2858/modules/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java
Sun Jan 29 16:24:30 2012
@@ -19,10 +19,14 @@ package org.apache.lucene.search.groupin
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.*;
+import org.apache.lucene.index.AtomicIndexReader;
+import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext;
+import org.apache.lucene.index.CompositeIndexReader;
+import org.apache.lucene.index.DirectoryReader;
 import org.apache.lucene.index.FieldInfo.IndexOptions;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.RandomIndexWriter;
-import org.apache.lucene.index.SlowMultiReaderWrapper;
+import org.apache.lucene.index.SlowCompositeReaderWrapper;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.DocValues.Type;
 import org.apache.lucene.queries.function.ValueSource;
@@ -553,7 +557,7 @@ public class TestGrouping extends Lucene
     }
   }
 
-  private IndexReader getDocBlockReader(Directory dir, GroupDoc[] groupDocs) throws IOException
{
+  private DirectoryReader getDocBlockReader(Directory dir, GroupDoc[] groupDocs) throws IOException
{
     // Coalesce by group, but in random order:
     Collections.shuffle(Arrays.asList(groupDocs), random);
     final Map<BytesRef,List<GroupDoc>> groupMap = new HashMap<BytesRef,List<GroupDoc>>();
@@ -610,7 +614,7 @@ public class TestGrouping extends Lucene
       w.updateDocuments(new Term("group", docs.get(0).get("group")), docs);
     }
 
-    final IndexReader r = w.getReader();
+    final DirectoryReader r = w.getReader();
     w.close();
 
     return r;
@@ -622,19 +626,17 @@ public class TestGrouping extends Lucene
     public final int[] docStarts;
 
     public ShardState(IndexSearcher s) {
-      IndexReader[] subReaders = s.getIndexReader().getSequentialSubReaders();
-      if (subReaders == null) {
-        subReaders = new IndexReader[] {s.getIndexReader()};
-      }
-      subSearchers = new ShardSearcher[subReaders.length];
+      List<AtomicIndexReader> subReaders = new ArrayList<AtomicIndexReader>();
+      ReaderUtil.gatherSubReaders(subReaders, s.getIndexReader());
+      subSearchers = new ShardSearcher[subReaders.size()];
       final IndexReader.ReaderContext ctx = s.getTopReaderContext();
-      if (ctx instanceof IndexReader.AtomicReaderContext) {
+      if (ctx instanceof AtomicReaderContext) {
         assert subSearchers.length == 1;
-        subSearchers[0] = new ShardSearcher((IndexReader.AtomicReaderContext) ctx, ctx);
+        subSearchers[0] = new ShardSearcher((AtomicReaderContext) ctx, ctx);
       } else {
-        final IndexReader.CompositeReaderContext compCTX = (IndexReader.CompositeReaderContext)
ctx;
+        final CompositeIndexReader.CompositeReaderContext compCTX = (CompositeIndexReader.CompositeReaderContext)
ctx;
         for(int searcherIDX=0;searcherIDX<subSearchers.length;searcherIDX++) {
-          subSearchers[searcherIDX] = new ShardSearcher(compCTX.leaves[searcherIDX], compCTX);
+          subSearchers[searcherIDX] = new ShardSearcher(compCTX.leaves()[searcherIDX], compCTX);
         }
       }
 
@@ -642,7 +644,7 @@ public class TestGrouping extends Lucene
       int docBase = 0;
       for(int subIDX=0;subIDX<docStarts.length;subIDX++) {
         docStarts[subIDX] = docBase;
-        docBase += subReaders[subIDX].maxDoc();
+        docBase += subReaders.get(subIDX).maxDoc();
         //System.out.println("docStarts[" + subIDX + "]=" + docStarts[subIDX]);
       }
     }
@@ -762,17 +764,17 @@ public class TestGrouping extends Lucene
       final GroupDoc[] groupDocsByID = new GroupDoc[groupDocs.length];
       System.arraycopy(groupDocs, 0, groupDocsByID, 0, groupDocs.length);
 
-      final IndexReader r = w.getReader();
+      final DirectoryReader r = w.getReader();
       w.close();
 
       // NOTE: intentional but temporary field cache insanity!
-      final int[] docIDToID = FieldCache.DEFAULT.getInts(new SlowMultiReaderWrapper(r), "id",
false);
-      IndexReader rBlocks = null;
+      final int[] docIDToID = FieldCache.DEFAULT.getInts(new SlowCompositeReaderWrapper(r),
"id", false);
+      DirectoryReader rBlocks = null;
       Directory dirBlocks = null;
 
       try {
         final IndexSearcher s = newSearcher(r);
-        if (SlowMultiReaderWrapper.class.isAssignableFrom(s.getIndexReader().getClass()))
{
+        if (SlowCompositeReaderWrapper.class.isAssignableFrom(s.getIndexReader().getClass()))
{
           canUseIDV = false;
         } else {
           canUseIDV = !preFlex;
@@ -799,7 +801,7 @@ public class TestGrouping extends Lucene
         dirBlocks = newDirectory();
         rBlocks = getDocBlockReader(dirBlocks, groupDocs);
         final Filter lastDocInBlock = new CachingWrapperFilter(new QueryWrapperFilter(new
TermQuery(new Term("groupend", "x"))));
-        final int[] docIDToIDBlocks = FieldCache.DEFAULT.getInts(new SlowMultiReaderWrapper(rBlocks),
"id", false);
+        final int[] docIDToIDBlocks = FieldCache.DEFAULT.getInts(new SlowCompositeReaderWrapper(rBlocks),
"id", false);
 
         final IndexSearcher sBlocks = newSearcher(rBlocks);
         final ShardState shardsBlocks = new ShardState(sBlocks);
@@ -1138,9 +1140,9 @@ public class TestGrouping extends Lucene
           assertEquals(docIDToIDBlocks, expectedGroups, topGroupsBlockShards, false, false,
fillFields, getScores, false);
         }
       } finally {
-        FieldCache.DEFAULT.purge(r);
+        // nocommit FieldCache.DEFAULT.purge(r);
         if (rBlocks != null) {
-          FieldCache.DEFAULT.purge(rBlocks);
+          // nocommit FieldCache.DEFAULT.purge(rBlocks);
         }
       }
 
@@ -1177,7 +1179,7 @@ public class TestGrouping extends Lucene
     List<AbstractFirstPassGroupingCollector> firstPassGroupingCollectors = new ArrayList<AbstractFirstPassGroupingCollector>();
     AbstractFirstPassGroupingCollector firstPassCollector = null;
     for(int shardIDX=0;shardIDX<subSearchers.length;shardIDX++) {
-      if (SlowMultiReaderWrapper.class.isAssignableFrom(subSearchers[shardIDX].getIndexReader().getClass()))
{
+      if (SlowCompositeReaderWrapper.class.isAssignableFrom(subSearchers[shardIDX].getIndexReader().getClass()))
{
         canUseIDV = false;
       } else {
         canUseIDV = !preFlex;
@@ -1311,11 +1313,11 @@ public class TestGrouping extends Lucene
   }
 
   private static class ShardSearcher extends IndexSearcher {
-    private final IndexReader.AtomicReaderContext[] ctx;
+    private final AtomicReaderContext[] ctx;
 
-    public ShardSearcher(IndexReader.AtomicReaderContext ctx, IndexReader.ReaderContext parent)
{
+    public ShardSearcher(AtomicReaderContext ctx, IndexReader.ReaderContext parent) {
       super(parent);
-      this.ctx = new IndexReader.AtomicReaderContext[] {ctx};
+      this.ctx = new AtomicReaderContext[] {ctx};
     }
 
     public void search(Weight weight, Collector collector) throws IOException {
@@ -1328,7 +1330,7 @@ public class TestGrouping extends Lucene
 
     @Override
     public String toString() {
-      return "ShardSearcher(" + ctx[0].reader + ")";
+      return "ShardSearcher(" + ctx[0].reader() + ")";
     }
   }
 



Mime
View raw message