diff --git a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geohash/GeoHashDistanceFilter.java b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geohash/GeoHashDistanceFilter.java index d5b0c836483..eb2968eeb09 100644 --- a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geohash/GeoHashDistanceFilter.java +++ b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geohash/GeoHashDistanceFilter.java @@ -19,7 +19,7 @@ package org.apache.lucene.spatial.geohash; import java.io.IOException; -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.FieldCache.DocTerms; import org.apache.lucene.search.Filter; @@ -60,11 +60,11 @@ public class GeoHashDistanceFilter extends DistanceFilter { @Override public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException { - final DocTerms geoHashValues = FieldCache.DEFAULT.getTerms(context.reader, geoHashField); + final DocTerms geoHashValues = FieldCache.DEFAULT.getTerms(context.reader(), geoHashField); final BytesRef br = new BytesRef(); final int docBase = nextDocBase; - nextDocBase += context.reader.maxDoc(); + nextDocBase += context.reader().maxDoc(); return new FilteredDocIdSet(startingFilter.getDocIdSet(context, acceptDocs)) { @Override diff --git a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianShapeFilter.java b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianShapeFilter.java index db00c9cf006..e09ab622fdb 100644 --- a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianShapeFilter.java +++ b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianShapeFilter.java @@ -20,7 +20,7 @@ import java.io.IOException; import java.util.List; import org.apache.lucene.index.DocsEnum; -import org.apache.lucene.index.IndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; import org.apache.lucene.search.Filter; import org.apache.lucene.search.DocIdSet; import org.apache.lucene.search.DocIdSetIterator; @@ -57,7 +57,7 @@ public class CartesianShapeFilter extends Filter { return new DocIdSet() { @Override public DocIdSetIterator iterator() throws IOException { - return context.reader.termDocsEnum(acceptDocs, fieldName, bytesRef, false); + return context.reader().termDocsEnum(acceptDocs, fieldName, bytesRef, false); } @Override @@ -66,11 +66,11 @@ public class CartesianShapeFilter extends Filter { } }; } else { - final FixedBitSet bits = new FixedBitSet(context.reader.maxDoc()); + final FixedBitSet bits = new FixedBitSet(context.reader().maxDoc()); for (int i =0; i< sz; i++) { double boxId = area.get(i).doubleValue(); NumericUtils.longToPrefixCoded(NumericUtils.doubleToSortableLong(boxId), 0, bytesRef); - final DocsEnum docsEnum = context.reader.termDocsEnum(acceptDocs, fieldName, bytesRef, false); + final DocsEnum docsEnum = context.reader().termDocsEnum(acceptDocs, fieldName, bytesRef, false); if (docsEnum == null) continue; // iterate through all documents // which have this boxId diff --git a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java index b16546791b2..7bcb81f9c92 100644 --- a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java +++ b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java @@ -19,7 +19,7 @@ package org.apache.lucene.spatial.tier; import java.io.IOException; -import org.apache.lucene.index.IndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; import org.apache.lucene.search.Filter; import org.apache.lucene.search.FieldComparator; import org.apache.lucene.search.FieldComparatorSource; diff --git a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/LatLongDistanceFilter.java b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/LatLongDistanceFilter.java index bf19d51ae10..5280281c26e 100644 --- a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/LatLongDistanceFilter.java +++ b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/LatLongDistanceFilter.java @@ -19,7 +19,7 @@ package org.apache.lucene.spatial.tier; import java.io.IOException; -import org.apache.lucene.index.IndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; import org.apache.lucene.search.FilteredDocIdSet; import org.apache.lucene.search.FieldCache; import org.apache.lucene.search.Filter; @@ -63,11 +63,11 @@ public class LatLongDistanceFilter extends DistanceFilter { @Override public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException { - final double[] latIndex = FieldCache.DEFAULT.getDoubles(context.reader, latField, false); - final double[] lngIndex = FieldCache.DEFAULT.getDoubles(context.reader, lngField, false); + final double[] latIndex = FieldCache.DEFAULT.getDoubles(context.reader(), latField, false); + final double[] lngIndex = FieldCache.DEFAULT.getDoubles(context.reader(), lngField, false); final int docBase = nextDocBase; - nextDocBase += context.reader.maxDoc(); + nextDocBase += context.reader().maxDoc(); return new FilteredDocIdSet(startingFilter.getDocIdSet(context, acceptDocs)) { @Override diff --git a/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java b/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java index 8fb9981d073..889c7cacc18 100644 --- a/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java +++ b/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java @@ -24,7 +24,7 @@ import org.apache.lucene.document.FieldType; import org.apache.lucene.document.NumericField; import org.apache.lucene.document.TextField; import org.apache.lucene.index.FieldInfo.IndexOptions; -import org.apache.lucene.index.IndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.Term; @@ -119,7 +119,7 @@ public class TestDistance extends LuceneTestCase { AtomicReaderContext[] leaves = ReaderUtil.leaves(r.getTopReaderContext()); for (int i = 0; i < leaves.length; i++) { - f.getDocIdSet(leaves[i], leaves[i].reader.getLiveDocs()); + f.getDocIdSet(leaves[i], leaves[i].reader().getLiveDocs()); } r.close(); }