From 2d4c738067a00d00eb35c0cd2f4a6ce1d5f1550e Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Sun, 29 Jan 2012 23:50:54 +0000 Subject: [PATCH] LUCENE-2858: Rename AtomicIndexReader -> AtomicReader, CompositeIndexReader -> CompositeReader. Contexts not yet changed! git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene2858@1237508 13f79535-47bb-0310-9956-ffa450edef68 --- .../highlight/WeightedSpanTermExtractor.java | 2 +- .../highlight/HighlighterPhraseTest.java | 2 +- .../lucene/index/memory/MemoryIndex.java | 6 +- .../lucene/index/memory/MemoryIndexTest.java | 6 +- .../lucene/index/MultiPassIndexSplitter.java | 10 +-- .../apache/lucene/index/PKIndexSplitter.java | 2 +- .../org/apache/lucene/misc/HighFreqTerms.java | 4 +- .../sandbox/queries/DuplicateFilter.java | 6 +- .../queries/SlowCollatedStringComparator.java | 2 +- .../geohash/GeoHashDistanceFilter.java | 2 +- .../spatial/tier/CartesianShapeFilter.java | 2 +- .../tier/DistanceFieldComparatorSource.java | 2 +- .../spatial/tier/LatLongDistanceFilter.java | 2 +- .../lucene/spatial/tier/TestDistance.java | 2 +- .../apache/lucene/codecs/PerDocConsumer.java | 6 +- .../codecs/lucene40/Lucene40NormsFormat.java | 4 +- .../simpletext/SimpleTextNormsConsumer.java | 4 +- ...omicIndexReader.java => AtomicReader.java} | 24 ++---- .../apache/lucene/index/BaseMultiReader.java | 2 +- .../lucene/index/BufferedDeletesStream.java | 2 +- ...eIndexReader.java => CompositeReader.java} | 32 ++------ .../org/apache/lucene/index/DocTermOrds.java | 16 ++-- .../lucene/index/FilterIndexReader.java | 6 +- .../org/apache/lucene/index/IndexReader.java | 6 +- .../org/apache/lucene/index/IndexWriter.java | 2 +- .../org/apache/lucene/index/MergeState.java | 4 +- .../apache/lucene/index/MultiDocValues.java | 18 ++-- .../org/apache/lucene/index/MultiFields.java | 16 ++-- .../apache/lucene/index/ParallelReader.java | 34 ++++---- .../apache/lucene/index/SegmentMerger.java | 4 +- .../apache/lucene/index/SegmentReader.java | 2 +- .../index/SlowCompositeReaderWrapper.java | 18 ++-- .../apache/lucene/search/BooleanQuery.java | 2 +- .../apache/lucene/search/BooleanScorer.java | 2 +- .../lucene/search/CachingCollector.java | 2 +- .../lucene/search/CachingWrapperFilter.java | 8 +- .../org/apache/lucene/search/Collector.java | 2 +- .../lucene/search/ConstantScoreQuery.java | 2 +- .../lucene/search/DisjunctionMaxQuery.java | 2 +- .../org/apache/lucene/search/FieldCache.java | 56 ++++++------- .../apache/lucene/search/FieldCacheImpl.java | 82 +++++++++---------- .../lucene/search/FieldCacheRangeFilter.java | 2 +- .../lucene/search/FieldCacheTermsFilter.java | 2 +- .../apache/lucene/search/FieldComparator.java | 2 +- .../lucene/search/FieldValueFilter.java | 2 +- .../java/org/apache/lucene/search/Filter.java | 2 +- .../apache/lucene/search/FilteredQuery.java | 2 +- .../apache/lucene/search/IndexSearcher.java | 2 +- .../lucene/search/MatchAllDocsQuery.java | 2 +- .../apache/lucene/search/MultiCollector.java | 2 +- .../lucene/search/MultiPhraseQuery.java | 6 +- .../search/MultiTermQueryWrapperFilter.java | 6 +- .../org/apache/lucene/search/PhraseQuery.java | 8 +- .../search/PositiveScoresOnlyCollector.java | 2 +- .../lucene/search/QueryWrapperFilter.java | 2 +- .../lucene/search/TermCollectingRewrite.java | 2 +- .../org/apache/lucene/search/TermQuery.java | 6 +- .../lucene/search/TimeLimitingCollector.java | 2 +- .../lucene/search/TopFieldCollector.java | 2 +- .../lucene/search/TopScoreDocCollector.java | 2 +- .../lucene/search/TotalHitCountCollector.java | 2 +- .../java/org/apache/lucene/search/Weight.java | 2 +- .../search/payloads/PayloadNearQuery.java | 2 +- .../search/payloads/PayloadSpanUtil.java | 2 +- .../search/payloads/PayloadTermQuery.java | 2 +- .../search/similarities/BM25Similarity.java | 2 +- .../search/similarities/MultiSimilarity.java | 2 +- .../search/similarities/Similarity.java | 2 +- .../search/similarities/SimilarityBase.java | 2 +- .../search/similarities/TFIDFSimilarity.java | 2 +- .../search/spans/FieldMaskingSpanQuery.java | 2 +- .../lucene/search/spans/NearSpansOrdered.java | 2 +- .../search/spans/NearSpansUnordered.java | 2 +- .../spans/SpanMultiTermQueryWrapper.java | 2 +- .../lucene/search/spans/SpanNearQuery.java | 2 +- .../lucene/search/spans/SpanNotQuery.java | 2 +- .../lucene/search/spans/SpanOrQuery.java | 2 +- .../search/spans/SpanPositionCheckQuery.java | 2 +- .../apache/lucene/search/spans/SpanQuery.java | 2 +- .../lucene/search/spans/SpanTermQuery.java | 2 +- .../lucene/search/spans/SpanWeight.java | 2 +- .../lucene/util/FieldCacheSanityChecker.java | 2 +- .../org/apache/lucene/util/ReaderUtil.java | 30 +++---- .../org/apache/lucene/util/TermContext.java | 2 +- .../ThreadedIndexingAndSearchingTestCase.java | 2 +- .../lucene/search/AssertingIndexSearcher.java | 2 +- .../org/apache/lucene/search/CheckHits.java | 2 +- .../org/apache/lucene/search/QueryUtils.java | 16 ++-- .../codecs/lucene40/TestReuseDocsEnum.java | 10 +-- .../codecs/pulsing/TestPulsingReuse.java | 6 +- .../apache/lucene/index/TestAddIndexes.java | 2 +- .../apache/lucene/index/TestCustomNorms.java | 2 +- .../apache/lucene/index/TestDocTermOrds.java | 10 +-- .../lucene/index/TestDocValuesIndexing.java | 6 +- .../lucene/index/TestDocsAndPositions.java | 8 +- .../apache/lucene/index/TestFieldsReader.java | 2 +- .../apache/lucene/index/TestIndexReader.java | 8 +- .../lucene/index/TestIndexReaderReopen.java | 6 +- .../apache/lucene/index/TestIndexWriter.java | 6 +- .../lucene/index/TestIndexWriterReader.java | 4 +- .../lucene/index/TestIndexWriterUnicode.java | 2 +- .../lucene/index/TestMultiLevelSkipList.java | 2 +- .../org/apache/lucene/index/TestNorms.java | 6 +- .../org/apache/lucene/index/TestOmitTf.java | 2 +- .../lucene/index/TestParallelTermEnum.java | 4 +- .../lucene/index/TestPostingsOffsets.java | 2 +- .../lucene/index/TestSegmentReader.java | 2 +- .../lucene/index/TestStressIndexing2.java | 2 +- .../lucene/index/TestTypePromotion.java | 2 +- .../search/FieldCacheRewriteMethod.java | 2 +- .../lucene/search/JustCompileSearch.java | 2 +- .../org/apache/lucene/search/MockFilter.java | 2 +- .../lucene/search/MultiCollectorTest.java | 2 +- .../lucene/search/SingleDocTestFilter.java | 2 +- .../lucene/search/TestBooleanScorer.java | 2 +- .../lucene/search/TestCachingCollector.java | 2 +- .../search/TestCachingWrapperFilter.java | 2 +- .../lucene/search/TestConstantScoreQuery.java | 2 +- .../search/TestDisjunctionMaxQuery.java | 2 +- .../apache/lucene/search/TestDocBoost.java | 2 +- .../apache/lucene/search/TestDocIdSet.java | 2 +- .../lucene/search/TestDocValuesScoring.java | 2 +- .../search/TestElevationComparator.java | 2 +- .../apache/lucene/search/TestFieldCache.java | 4 +- .../lucene/search/TestFilteredQuery.java | 2 +- .../lucene/search/TestFilteredSearch.java | 2 +- .../search/TestMultiTermConstantScore.java | 2 +- .../search/TestNumericRangeQuery32.java | 2 +- .../search/TestNumericRangeQuery64.java | 2 +- .../lucene/search/TestPositionIncrement.java | 4 +- .../TestScoreCachingWrappingScorer.java | 2 +- .../apache/lucene/search/TestScorerPerf.java | 2 +- .../lucene/search/TestShardSearching.java | 4 +- .../apache/lucene/search/TestSimilarity.java | 2 +- .../lucene/search/TestSloppyPhraseQuery.java | 2 +- .../org/apache/lucene/search/TestSort.java | 2 +- .../lucene/search/TestSubScorerFreqs.java | 2 +- .../apache/lucene/search/TestTermScorer.java | 2 +- .../search/TestTimeLimitingCollector.java | 2 +- .../lucene/search/TestTopDocsCollector.java | 2 +- .../lucene/search/TestTopDocsMerge.java | 16 ++-- .../search/similarities/TestSimilarity2.java | 2 +- .../search/spans/JustCompileSearchSpans.java | 2 +- .../search/spans/MultiSpansWrapper.java | 2 +- .../search/spans/TestNearSpansOrdered.java | 2 +- .../apache/lucene/search/spans/TestSpans.java | 2 +- .../util/TestFieldCacheSanityChecker.java | 10 +-- .../lucene/facet/search/FacetsCollector.java | 2 +- .../facet/search/ScoredDocIdCollector.java | 2 +- .../AbstractFirstPassGroupingCollector.java | 2 +- .../AbstractSecondPassGroupingCollector.java | 2 +- .../grouping/BlockGroupingCollector.java | 2 +- .../grouping/dv/DVAllGroupHeadsCollector.java | 2 +- .../grouping/dv/DVAllGroupsCollector.java | 2 +- .../dv/DVFirstPassGroupingCollector.java | 2 +- .../dv/DVSecondPassGroupingCollector.java | 2 +- .../FunctionAllGroupHeadsCollector.java | 2 +- .../function/FunctionAllGroupsCollector.java | 2 +- .../FunctionFirstPassGroupingCollector.java | 2 +- .../FunctionSecondPassGroupingCollector.java | 2 +- .../term/TermAllGroupHeadsCollector.java | 2 +- .../grouping/term/TermAllGroupsCollector.java | 2 +- .../term/TermFirstPassGroupingCollector.java | 2 +- .../term/TermSecondPassGroupingCollector.java | 2 +- .../lucene/search/grouping/TestGrouping.java | 10 +-- .../lucene/search/join/TermsCollector.java | 2 +- .../search/join/ToChildBlockJoinQuery.java | 2 +- .../join/ToParentBlockJoinCollector.java | 2 +- .../search/join/ToParentBlockJoinQuery.java | 2 +- .../lucene/search/join/TestBlockJoin.java | 2 +- .../lucene/search/join/TestJoinUtil.java | 2 +- .../apache/lucene/queries/BooleanFilter.java | 6 +- .../apache/lucene/queries/ChainedFilter.java | 6 +- .../lucene/queries/CustomScoreProvider.java | 2 +- .../lucene/queries/CustomScoreQuery.java | 2 +- .../apache/lucene/queries/TermsFilter.java | 4 +- .../lucene/queries/function/BoostedQuery.java | 2 +- .../queries/function/FunctionQuery.java | 2 +- .../lucene/queries/function/ValueSource.java | 2 +- .../docvalues/StringIndexDocValues.java | 2 +- .../function/valuesource/ByteFieldSource.java | 2 +- .../valuesource/BytesRefFieldSource.java | 2 +- .../valuesource/ConstValueSource.java | 2 +- .../function/valuesource/DefFunction.java | 2 +- .../valuesource/DocFreqValueSource.java | 2 +- .../valuesource/DoubleConstValueSource.java | 2 +- .../valuesource/DoubleFieldSource.java | 2 +- .../valuesource/DualFloatFunction.java | 2 +- .../valuesource/FloatFieldSource.java | 2 +- .../function/valuesource/IDFValueSource.java | 2 +- .../function/valuesource/IfFunction.java | 2 +- .../function/valuesource/IntFieldSource.java | 2 +- .../valuesource/JoinDocFreqValueSource.java | 2 +- .../valuesource/LinearFloatFunction.java | 2 +- .../valuesource/LiteralValueSource.java | 2 +- .../function/valuesource/LongFieldSource.java | 2 +- .../valuesource/MaxDocValueSource.java | 2 +- .../valuesource/MultiBoolFunction.java | 2 +- .../valuesource/MultiFloatFunction.java | 2 +- .../function/valuesource/MultiFunction.java | 2 +- .../function/valuesource/NormValueSource.java | 2 +- .../valuesource/NumDocsValueSource.java | 2 +- .../NumericIndexDocValueSource.java | 2 +- .../function/valuesource/OrdFieldSource.java | 12 +-- .../valuesource/QueryValueSource.java | 2 +- .../valuesource/RangeMapFloatFunction.java | 2 +- .../valuesource/ReciprocalFloatFunction.java | 2 +- .../valuesource/ReverseOrdFieldSource.java | 12 +-- .../valuesource/ScaleFloatFunction.java | 2 +- .../valuesource/ShortFieldSource.java | 2 +- .../valuesource/SimpleBoolFunction.java | 2 +- .../valuesource/SimpleFloatFunction.java | 2 +- .../SumTotalTermFreqValueSource.java | 2 +- .../function/valuesource/TFValueSource.java | 2 +- .../valuesource/TermFreqValueSource.java | 2 +- .../valuesource/TotalTermFreqValueSource.java | 2 +- .../valuesource/VectorValueSource.java | 2 +- .../lucene/queries/BooleanFilterTest.java | 6 +- .../lucene/queries/TermsFilterTest.java | 2 +- .../lucene/queries/TestCustomScoreQuery.java | 2 +- .../builders/NumericRangeFilterBuilder.java | 2 +- .../surround/query/BooleanQueryTst.java | 2 +- .../lucene/queryparser/xml/TestParser.java | 2 +- .../TestNumericRangeFilterBuilder.java | 6 +- .../lucene/search/spell/SpellChecker.java | 4 +- 225 files changed, 470 insertions(+), 494 deletions(-) rename lucene/src/java/org/apache/lucene/index/{AtomicIndexReader.java => AtomicReader.java} (94%) rename lucene/src/java/org/apache/lucene/index/{CompositeIndexReader.java => CompositeReader.java} (84%) diff --git a/lucene/contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java b/lucene/contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java index 8f47e81fd87..09055185eba 100644 --- a/lucene/contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java +++ b/lucene/contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java @@ -31,7 +31,7 @@ import org.apache.lucene.analysis.CachingTokenFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.Term; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.memory.MemoryIndex; import org.apache.lucene.search.*; import org.apache.lucene.search.spans.FieldMaskingSpanQuery; diff --git a/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterPhraseTest.java b/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterPhraseTest.java index 6b0421bede2..eee855d2a5d 100644 --- a/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterPhraseTest.java +++ b/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterPhraseTest.java @@ -34,7 +34,7 @@ import org.apache.lucene.index.CorruptIndexException; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.Term; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.Collector; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.PhraseQuery; diff --git a/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java b/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java index 837d1ca9b39..96f67d06990 100644 --- a/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java +++ b/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java @@ -33,7 +33,7 @@ import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute; import org.apache.lucene.document.Document; -import org.apache.lucene.index.AtomicIndexReader; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.Norm; import org.apache.lucene.index.DocValues; import org.apache.lucene.index.DocsAndPositionsEnum; @@ -42,7 +42,7 @@ import org.apache.lucene.index.FieldInfos; import org.apache.lucene.index.FieldInvertState; import org.apache.lucene.index.Fields; import org.apache.lucene.index.FieldsEnum; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.OrdTermState; import org.apache.lucene.index.StoredFieldVisitor; @@ -750,7 +750,7 @@ public class MemoryIndex { * Search support for Lucene framework integration; implements all methods * required by the Lucene IndexReader contracts. */ - private final class MemoryIndexReader extends AtomicIndexReader { + private final class MemoryIndexReader extends AtomicReader { private IndexSearcher searcher; // needed to find searcher.getSimilarity() diff --git a/lucene/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java b/lucene/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java index 6b730075b07..a42004a0f54 100644 --- a/lucene/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java +++ b/lucene/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java @@ -33,7 +33,7 @@ import org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.document.TextField; -import org.apache.lucene.index.AtomicIndexReader; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.DocsAndPositionsEnum; import org.apache.lucene.index.DocsEnum; import org.apache.lucene.index.IndexReader; @@ -186,7 +186,7 @@ public class MemoryIndexTest extends BaseTokenStreamTestCase { Analyzer analyzer = new MockAnalyzer(random); MemoryIndex memory = new MemoryIndex(); memory.addField("foo", "bar", analyzer); - AtomicIndexReader reader = (AtomicIndexReader) memory.createSearcher().getIndexReader(); + AtomicReader reader = (AtomicReader) memory.createSearcher().getIndexReader(); DocsEnum disi = _TestUtil.docs(random, reader, "foo", new BytesRef("bar"), null, null, false); int docid = disi.docID(); assertTrue(docid == -1 || docid == DocIdSetIterator.NO_MORE_DOCS); @@ -206,7 +206,7 @@ public class MemoryIndexTest extends BaseTokenStreamTestCase { Analyzer analyzer = new MockAnalyzer(random); MemoryIndex memory = new MemoryIndex(); memory.addField("foo", "bar", analyzer); - AtomicIndexReader reader = (AtomicIndexReader) memory.createSearcher().getIndexReader(); + AtomicReader reader = (AtomicReader) memory.createSearcher().getIndexReader(); DocsAndPositionsEnum disi = reader.termPositionsEnum(null, "foo", new BytesRef("bar"), false); int docid = disi.docID(); assertTrue(docid == -1 || docid == DocIdSetIterator.NO_MORE_DOCS); diff --git a/lucene/contrib/misc/src/java/org/apache/lucene/index/MultiPassIndexSplitter.java b/lucene/contrib/misc/src/java/org/apache/lucene/index/MultiPassIndexSplitter.java index 036a46adebf..76543eb5ced 100644 --- a/lucene/contrib/misc/src/java/org/apache/lucene/index/MultiPassIndexSplitter.java +++ b/lucene/contrib/misc/src/java/org/apache/lucene/index/MultiPassIndexSplitter.java @@ -182,15 +182,15 @@ public class MultiPassIndexSplitter { super(initSubReaders(reader), false /* dont close */); } - private static AtomicIndexReader[] initSubReaders(IndexReader reader) throws IOException { - final ArrayList subs = new ArrayList(); + private static AtomicReader[] initSubReaders(IndexReader reader) throws IOException { + final ArrayList subs = new ArrayList(); new ReaderUtil.Gather(reader) { @Override - protected void add(int base, AtomicIndexReader r) { + protected void add(int base, AtomicReader r) { subs.add(new FakeDeleteAtomicIndexReader(r)); } }.run(); - return subs.toArray(new AtomicIndexReader[subs.size()]); + return subs.toArray(new AtomicReader[subs.size()]); } public void deleteDocument(int docID) { @@ -226,7 +226,7 @@ public class MultiPassIndexSplitter { private static final class FakeDeleteAtomicIndexReader extends FilterIndexReader { FixedBitSet liveDocs; - public FakeDeleteAtomicIndexReader(AtomicIndexReader reader) { + public FakeDeleteAtomicIndexReader(AtomicReader reader) { super(reader); undeleteAll(); // initialize main bitset } diff --git a/lucene/contrib/misc/src/java/org/apache/lucene/index/PKIndexSplitter.java b/lucene/contrib/misc/src/java/org/apache/lucene/index/PKIndexSplitter.java index da4289bf438..9110fcd062d 100644 --- a/lucene/contrib/misc/src/java/org/apache/lucene/index/PKIndexSplitter.java +++ b/lucene/contrib/misc/src/java/org/apache/lucene/index/PKIndexSplitter.java @@ -20,7 +20,7 @@ package org.apache.lucene.index; import java.io.IOException; import org.apache.lucene.index.IndexWriterConfig.OpenMode; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.DocIdSet; import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.search.Filter; diff --git a/lucene/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java b/lucene/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java index 3e3f4d94210..d92ad9ba162 100644 --- a/lucene/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java +++ b/lucene/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java @@ -17,7 +17,7 @@ package org.apache.lucene.misc; * limitations under the License. */ -import org.apache.lucene.index.AtomicIndexReader; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.MultiFields; import org.apache.lucene.index.Fields; @@ -188,7 +188,7 @@ public class HighFreqTerms { new ReaderUtil.Gather(reader) { @Override - protected void add(int base, AtomicIndexReader r) throws IOException { + protected void add(int base, AtomicReader r) throws IOException { Bits liveDocs = r.getLiveDocs(); if (liveDocs == null) { // TODO: we could do this up front, during the scan diff --git a/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/DuplicateFilter.java b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/DuplicateFilter.java index 1046c5aeb77..b392639615f 100644 --- a/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/DuplicateFilter.java +++ b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/DuplicateFilter.java @@ -17,7 +17,7 @@ package org.apache.lucene.sandbox.queries; */ import org.apache.lucene.index.*; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.DocIdSet; import org.apache.lucene.search.Filter; import org.apache.lucene.util.Bits; @@ -78,7 +78,7 @@ public class DuplicateFilter extends Filter { } } - private FixedBitSet correctBits(AtomicIndexReader reader, Bits acceptDocs) throws IOException { + private FixedBitSet correctBits(AtomicReader reader, Bits acceptDocs) throws IOException { FixedBitSet bits = new FixedBitSet(reader.maxDoc()); //assume all are INvalid Terms terms = reader.fields().terms(fieldName); @@ -115,7 +115,7 @@ public class DuplicateFilter extends Filter { return bits; } - private FixedBitSet fastBits(AtomicIndexReader reader, Bits acceptDocs) throws IOException { + private FixedBitSet fastBits(AtomicReader reader, Bits acceptDocs) throws IOException { FixedBitSet bits = new FixedBitSet(reader.maxDoc()); bits.set(0, reader.maxDoc()); //assume all are valid Terms terms = reader.fields().terms(fieldName); diff --git a/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowCollatedStringComparator.java b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowCollatedStringComparator.java index c67fa43e289..9ff64c9339a 100644 --- a/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowCollatedStringComparator.java +++ b/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowCollatedStringComparator.java @@ -20,7 +20,7 @@ package org.apache.lucene.sandbox.queries; import java.io.IOException; import java.text.Collator; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.FieldCache; import org.apache.lucene.search.FieldCache.DocTerms; import org.apache.lucene.search.FieldComparator; 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 eb2968eeb09..f49045acdec 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.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.FieldCache; import org.apache.lucene.search.FieldCache.DocTerms; import org.apache.lucene.search.Filter; 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 e09ab622fdb..53b75d9b297 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.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.Filter; import org.apache.lucene.search.DocIdSet; import org.apache.lucene.search.DocIdSetIterator; 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 7bcb81f9c92..e6574917e9f 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.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.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 5280281c26e..9163daead9e 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.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.FilteredDocIdSet; import org.apache.lucene.search.FieldCache; import org.apache.lucene.search.Filter; 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 889c7cacc18..4d28c34811b 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.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.Term; diff --git a/lucene/src/java/org/apache/lucene/codecs/PerDocConsumer.java b/lucene/src/java/org/apache/lucene/codecs/PerDocConsumer.java index 0851dd972e3..dccd6a3284e 100644 --- a/lucene/src/java/org/apache/lucene/codecs/PerDocConsumer.java +++ b/lucene/src/java/org/apache/lucene/codecs/PerDocConsumer.java @@ -20,7 +20,7 @@ import java.io.IOException; import org.apache.lucene.index.FieldInfo; import org.apache.lucene.index.DocValues; -import org.apache.lucene.index.AtomicIndexReader; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.MergeState; import org.apache.lucene.index.DocValues.Type; @@ -65,13 +65,13 @@ public abstract class PerDocConsumer implements Closeable { /** * Returns a {@link DocValues} instance for merging from the given reader for the given * {@link FieldInfo}. This method is used for merging and uses - * {@link AtomicIndexReader#docValues(String)} by default. + * {@link AtomicReader#docValues(String)} by default. *

* To enable {@link DocValues} merging for different {@link DocValues} than * the default override this method accordingly. *

*/ - protected DocValues getDocValuesForMerge(AtomicIndexReader reader, FieldInfo info) throws IOException { + protected DocValues getDocValuesForMerge(AtomicReader reader, FieldInfo info) throws IOException { return reader.docValues(info.name); } diff --git a/lucene/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsFormat.java b/lucene/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsFormat.java index 8a6d0244841..a26d3879144 100644 --- a/lucene/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsFormat.java +++ b/lucene/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsFormat.java @@ -26,7 +26,7 @@ import org.apache.lucene.index.DocValues.Type; import org.apache.lucene.index.FieldInfo; import org.apache.lucene.index.FieldInfos; import org.apache.lucene.index.IndexFileNames; -import org.apache.lucene.index.AtomicIndexReader; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.PerDocWriteState; import org.apache.lucene.index.SegmentInfo; import org.apache.lucene.index.SegmentReadState; @@ -88,7 +88,7 @@ public class Lucene40NormsFormat extends NormsFormat { } @Override - protected DocValues getDocValuesForMerge(AtomicIndexReader reader, FieldInfo info) + protected DocValues getDocValuesForMerge(AtomicReader reader, FieldInfo info) throws IOException { return reader.normValues(info.name); } diff --git a/lucene/src/java/org/apache/lucene/codecs/simpletext/SimpleTextNormsConsumer.java b/lucene/src/java/org/apache/lucene/codecs/simpletext/SimpleTextNormsConsumer.java index 5d1bec7d439..1c3cff629ed 100644 --- a/lucene/src/java/org/apache/lucene/codecs/simpletext/SimpleTextNormsConsumer.java +++ b/lucene/src/java/org/apache/lucene/codecs/simpletext/SimpleTextNormsConsumer.java @@ -28,7 +28,7 @@ import org.apache.lucene.index.DocValues; import org.apache.lucene.index.FieldInfo; import org.apache.lucene.index.FieldInfos; import org.apache.lucene.index.IndexFileNames; -import org.apache.lucene.index.AtomicIndexReader; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.IndexableField; import org.apache.lucene.index.SegmentInfo; import org.apache.lucene.store.Directory; @@ -87,7 +87,7 @@ public class SimpleTextNormsConsumer extends PerDocConsumer { } @Override - protected DocValues getDocValuesForMerge(AtomicIndexReader reader, FieldInfo info) + protected DocValues getDocValuesForMerge(AtomicReader reader, FieldInfo info) throws IOException { return reader.normValues(info.name); } diff --git a/lucene/src/java/org/apache/lucene/index/AtomicIndexReader.java b/lucene/src/java/org/apache/lucene/index/AtomicReader.java similarity index 94% rename from lucene/src/java/org/apache/lucene/index/AtomicIndexReader.java rename to lucene/src/java/org/apache/lucene/index/AtomicReader.java index bc5b13e220c..9b3ac291fdf 100644 --- a/lucene/src/java/org/apache/lucene/index/AtomicIndexReader.java +++ b/lucene/src/java/org/apache/lucene/index/AtomicReader.java @@ -17,17 +17,9 @@ package org.apache.lucene.index; * limitations under the License. */ -import java.io.Closeable; import java.io.IOException; -import java.util.Collections; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.apache.lucene.index.CompositeIndexReader.CompositeReaderContext; -import org.apache.lucene.document.Document; -import org.apache.lucene.document.DocumentStoredFieldVisitor; +import org.apache.lucene.index.CompositeReader.CompositeReaderContext; import org.apache.lucene.search.SearcherManager; // javadocs import org.apache.lucene.store.*; import org.apache.lucene.util.Bits; @@ -66,11 +58,11 @@ import org.apache.lucene.util.ReaderUtil; // for javadocs IndexReader instance; use your own (non-Lucene) objects instead. */ -public abstract class AtomicIndexReader extends IndexReader { +public abstract class AtomicReader extends IndexReader { private final AtomicReaderContext readerContext = new AtomicReaderContext(this); - protected AtomicIndexReader() { + protected AtomicReader() { super(); } @@ -287,7 +279,7 @@ public abstract class AtomicIndexReader extends IndexReader { public abstract Bits getLiveDocs(); /** - * {@link ReaderContext} for {@link AtomicIndexReader} instances + * {@link ReaderContext} for {@link AtomicReader} instances * @lucene.experimental */ public static final class AtomicReaderContext extends ReaderContext { @@ -296,12 +288,12 @@ public abstract class AtomicIndexReader extends IndexReader { /** The readers absolute doc base */ public final int docBase; - private final AtomicIndexReader reader; + private final AtomicReader reader; /** * Creates a new {@link AtomicReaderContext} */ - public AtomicReaderContext(CompositeReaderContext parent, AtomicIndexReader reader, + public AtomicReaderContext(CompositeReaderContext parent, AtomicReader reader, int ord, int docBase, int leafOrd, int leafDocBase) { super(parent, ord, docBase); this.ord = leafOrd; @@ -309,7 +301,7 @@ public abstract class AtomicIndexReader extends IndexReader { this.reader = reader; } - public AtomicReaderContext(AtomicIndexReader atomicReader) { + public AtomicReaderContext(AtomicReader atomicReader) { this(null, atomicReader, 0, 0, 0, 0); } @@ -324,7 +316,7 @@ public abstract class AtomicIndexReader extends IndexReader { } @Override - public AtomicIndexReader reader() { + public AtomicReader reader() { return reader; } } diff --git a/lucene/src/java/org/apache/lucene/index/BaseMultiReader.java b/lucene/src/java/org/apache/lucene/index/BaseMultiReader.java index 3b0828a396e..bbba62675fb 100644 --- a/lucene/src/java/org/apache/lucene/index/BaseMultiReader.java +++ b/lucene/src/java/org/apache/lucene/index/BaseMultiReader.java @@ -23,7 +23,7 @@ import org.apache.lucene.util.Bits; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.ReaderUtil; -abstract class BaseMultiReader extends CompositeIndexReader { +abstract class BaseMultiReader extends CompositeReader { protected final R[] subReaders; protected final int[] starts; // 1st docno for each segment private final int maxDoc; diff --git a/lucene/src/java/org/apache/lucene/index/BufferedDeletesStream.java b/lucene/src/java/org/apache/lucene/index/BufferedDeletesStream.java index 6cd05bd08c2..e4f7569c659 100644 --- a/lucene/src/java/org/apache/lucene/index/BufferedDeletesStream.java +++ b/lucene/src/java/org/apache/lucene/index/BufferedDeletesStream.java @@ -25,7 +25,7 @@ import java.util.Collections; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.DocIdSet; import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.search.Query; diff --git a/lucene/src/java/org/apache/lucene/index/CompositeIndexReader.java b/lucene/src/java/org/apache/lucene/index/CompositeReader.java similarity index 84% rename from lucene/src/java/org/apache/lucene/index/CompositeIndexReader.java rename to lucene/src/java/org/apache/lucene/index/CompositeReader.java index aca7cb338dc..10976195a84 100644 --- a/lucene/src/java/org/apache/lucene/index/CompositeIndexReader.java +++ b/lucene/src/java/org/apache/lucene/index/CompositeReader.java @@ -17,24 +17,10 @@ package org.apache.lucene.index; * limitations under the License. */ -import java.io.Closeable; -import java.io.IOException; -import java.util.Collections; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.atomic.AtomicInteger; - -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; -import org.apache.lucene.document.Document; -import org.apache.lucene.document.DocumentStoredFieldVisitor; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.SearcherManager; // javadocs import org.apache.lucene.store.*; -import org.apache.lucene.util.Bits; -import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.ReaderUtil; // for javadocs -import org.apache.lucene.util.SetOnce; /** IndexReader is an abstract class, providing an interface for accessing an index. Search of an index is done entirely through this abstract interface, @@ -68,11 +54,11 @@ import org.apache.lucene.util.SetOnce; IndexReader instance; use your own (non-Lucene) objects instead. */ -public abstract class CompositeIndexReader extends IndexReader { +public abstract class CompositeReader extends IndexReader { private CompositeReaderContext readerContext = null; // lazy init - protected CompositeIndexReader() { + protected CompositeReader() { super(); } @@ -113,19 +99,19 @@ public abstract class CompositeIndexReader extends IndexReader { public abstract IndexReader[] getSequentialSubReaders(); /** - * {@link ReaderContext} for {@link CompositeIndexReader} instance. + * {@link ReaderContext} for {@link CompositeReader} instance. * @lucene.experimental */ public static final class CompositeReaderContext extends ReaderContext { private final ReaderContext[] children; private final AtomicReaderContext[] leaves; - private final CompositeIndexReader reader; + private final CompositeReader reader; /** * Creates a {@link CompositeReaderContext} for intermediate readers that aren't * not top-level readers in the current context */ - public CompositeReaderContext(CompositeReaderContext parent, CompositeIndexReader reader, + public CompositeReaderContext(CompositeReaderContext parent, CompositeReader reader, int ordInParent, int docbaseInParent, ReaderContext[] children) { this(parent, reader, ordInParent, docbaseInParent, children, null); } @@ -133,11 +119,11 @@ public abstract class CompositeIndexReader extends IndexReader { /** * Creates a {@link CompositeReaderContext} for top-level readers with parent set to null */ - public CompositeReaderContext(CompositeIndexReader reader, ReaderContext[] children, AtomicReaderContext[] leaves) { + public CompositeReaderContext(CompositeReader reader, ReaderContext[] children, AtomicReaderContext[] leaves) { this(null, reader, 0, 0, children, leaves); } - private CompositeReaderContext(CompositeReaderContext parent, CompositeIndexReader reader, + private CompositeReaderContext(CompositeReaderContext parent, CompositeReader reader, int ordInParent, int docbaseInParent, ReaderContext[] children, AtomicReaderContext[] leaves) { super(parent, ordInParent, docbaseInParent); @@ -158,7 +144,7 @@ public abstract class CompositeIndexReader extends IndexReader { } @Override - public CompositeIndexReader reader() { + public CompositeReader reader() { return reader; } } diff --git a/lucene/src/java/org/apache/lucene/index/DocTermOrds.java b/lucene/src/java/org/apache/lucene/index/DocTermOrds.java index 9d0579a9e1b..f43a0e33dea 100644 --- a/lucene/src/java/org/apache/lucene/index/DocTermOrds.java +++ b/lucene/src/java/org/apache/lucene/index/DocTermOrds.java @@ -147,19 +147,19 @@ public class DocTermOrds { } /** Inverts all terms */ - public DocTermOrds(AtomicIndexReader reader, String field) throws IOException { + public DocTermOrds(AtomicReader reader, String field) throws IOException { this(reader, field, null, Integer.MAX_VALUE); } /** Inverts only terms starting w/ prefix */ - public DocTermOrds(AtomicIndexReader reader, String field, BytesRef termPrefix) throws IOException { + public DocTermOrds(AtomicReader reader, String field, BytesRef termPrefix) throws IOException { this(reader, field, termPrefix, Integer.MAX_VALUE); } /** Inverts only terms starting w/ prefix, and only terms * whose docFreq (not taking deletions into account) is * <= maxTermDocFreq */ - public DocTermOrds(AtomicIndexReader reader, String field, BytesRef termPrefix, int maxTermDocFreq) throws IOException { + public DocTermOrds(AtomicReader reader, String field, BytesRef termPrefix, int maxTermDocFreq) throws IOException { this(reader, field, termPrefix, maxTermDocFreq, DEFAULT_INDEX_INTERVAL_BITS); uninvert(reader, termPrefix); } @@ -168,7 +168,7 @@ public class DocTermOrds { * whose docFreq (not taking deletions into account) is * <= maxTermDocFreq, with a custom indexing interval * (default is every 128nd term). */ - public DocTermOrds(AtomicIndexReader reader, String field, BytesRef termPrefix, int maxTermDocFreq, int indexIntervalBits) throws IOException { + public DocTermOrds(AtomicReader reader, String field, BytesRef termPrefix, int maxTermDocFreq, int indexIntervalBits) throws IOException { this(field, maxTermDocFreq, indexIntervalBits); uninvert(reader, termPrefix); } @@ -194,7 +194,7 @@ public class DocTermOrds { * *

NOTE: you must pass the same reader that was * used when creating this class */ - public TermsEnum getOrdTermsEnum(AtomicIndexReader reader) throws IOException { + public TermsEnum getOrdTermsEnum(AtomicReader reader) throws IOException { if (termInstances == 0) { return null; } @@ -224,7 +224,7 @@ public class DocTermOrds { } // Call this only once (if you subclass!) - protected void uninvert(final AtomicIndexReader reader, final BytesRef termPrefix) throws IOException { + protected void uninvert(final AtomicReader reader, final BytesRef termPrefix) throws IOException { //System.out.println("DTO uninvert field=" + field + " prefix=" + termPrefix); final long startTime = System.currentTimeMillis(); prefix = termPrefix == null ? null : BytesRef.deepCopyOf(termPrefix); @@ -642,12 +642,12 @@ public class DocTermOrds { * ord; in this case we "wrap" our own terms index * around it. */ private final class OrdWrappedTermsEnum extends TermsEnum { - private final AtomicIndexReader reader; + private final AtomicReader reader; private final TermsEnum termsEnum; private BytesRef term; private long ord = -indexInterval-1; // force "real" seek - public OrdWrappedTermsEnum(AtomicIndexReader reader) throws IOException { + public OrdWrappedTermsEnum(AtomicReader reader) throws IOException { this.reader = reader; assert indexedTermsArray != null; termsEnum = reader.fields().terms(field).iterator(null); diff --git a/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java b/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java index 7a7d9c510bb..45908ca328d 100644 --- a/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java +++ b/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java @@ -32,7 +32,7 @@ import java.util.Comparator; * further override some of these methods and may also provide additional * methods and fields. */ -public class FilterIndexReader extends AtomicIndexReader { +public class FilterIndexReader extends AtomicReader { /** Base class for filtering {@link Fields} * implementations. */ @@ -272,14 +272,14 @@ public class FilterIndexReader extends AtomicIndexReader { } } - protected AtomicIndexReader in; + protected AtomicReader in; /** *

Construct a FilterIndexReader based on the specified base reader. *

Note that base reader is closed if this FilterIndexReader is closed.

* @param in specified base reader. */ - public FilterIndexReader(AtomicIndexReader in) { + public FilterIndexReader(AtomicReader in) { super(); this.in = in; } diff --git a/lucene/src/java/org/apache/lucene/index/IndexReader.java b/lucene/src/java/org/apache/lucene/index/IndexReader.java index b458d419928..4d2e4ea4bd6 100644 --- a/lucene/src/java/org/apache/lucene/index/IndexReader.java +++ b/lucene/src/java/org/apache/lucene/index/IndexReader.java @@ -21,13 +21,11 @@ import java.io.Closeable; import java.io.IOException; import java.util.Collections; import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.lucene.index.CompositeIndexReader.CompositeReaderContext; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.CompositeReader.CompositeReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.document.Document; import org.apache.lucene.document.DocumentStoredFieldVisitor; import org.apache.lucene.search.SearcherManager; // javadocs diff --git a/lucene/src/java/org/apache/lucene/index/IndexWriter.java b/lucene/src/java/org/apache/lucene/index/IndexWriter.java index 0c87e03ffc0..76d633b38d7 100644 --- a/lucene/src/java/org/apache/lucene/index/IndexWriter.java +++ b/lucene/src/java/org/apache/lucene/index/IndexWriter.java @@ -3954,7 +3954,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit { *

NOTE: warm is called before any deletes have * been carried over to the merged segment. */ public static abstract class IndexReaderWarmer { - public abstract void warm(AtomicIndexReader reader) throws IOException; + public abstract void warm(AtomicReader reader) throws IOException; } private void handleOOM(OutOfMemoryError oom, String location) { diff --git a/lucene/src/java/org/apache/lucene/index/MergeState.java b/lucene/src/java/org/apache/lucene/index/MergeState.java index 26c28025264..c2bb14089fe 100644 --- a/lucene/src/java/org/apache/lucene/index/MergeState.java +++ b/lucene/src/java/org/apache/lucene/index/MergeState.java @@ -31,10 +31,10 @@ import org.apache.lucene.util.InfoStream; public class MergeState { public static class IndexReaderAndLiveDocs { - public final AtomicIndexReader reader; + public final AtomicReader reader; public final Bits liveDocs; - public IndexReaderAndLiveDocs(AtomicIndexReader reader, Bits liveDocs) { + public IndexReaderAndLiveDocs(AtomicReader reader, Bits liveDocs) { this.reader = reader; this.liveDocs = liveDocs; } diff --git a/lucene/src/java/org/apache/lucene/index/MultiDocValues.java b/lucene/src/java/org/apache/lucene/index/MultiDocValues.java index a0e56feb4d7..0e41f8dceef 100644 --- a/lucene/src/java/org/apache/lucene/index/MultiDocValues.java +++ b/lucene/src/java/org/apache/lucene/index/MultiDocValues.java @@ -43,11 +43,11 @@ public class MultiDocValues extends DocValues { private static DocValuesPuller DEFAULT_PULLER = new DocValuesPuller(); private static final DocValuesPuller NORMS_PULLER = new DocValuesPuller() { - public DocValues pull(AtomicIndexReader reader, String field) throws IOException { + public DocValues pull(AtomicReader reader, String field) throws IOException { return reader.normValues(field); } - public boolean stopLoadingOnNull(AtomicIndexReader reader, String field) throws IOException { + public boolean stopLoadingOnNull(AtomicReader reader, String field) throws IOException { // for norms we drop all norms if one leaf reader has no norms and the field is present FieldInfos fieldInfos = reader.getFieldInfos(); FieldInfo fieldInfo = fieldInfos.fieldInfo(field); @@ -69,11 +69,11 @@ public class MultiDocValues extends DocValues { } private static class DocValuesPuller { - public DocValues pull(AtomicIndexReader reader, String field) throws IOException { + public DocValues pull(AtomicReader reader, String field) throws IOException { return reader.docValues(field); } - public boolean stopLoadingOnNull(AtomicIndexReader reader, String field) throws IOException { + public boolean stopLoadingOnNull(AtomicReader reader, String field) throws IOException { return false; } } @@ -115,12 +115,12 @@ public class MultiDocValues extends DocValues { private static DocValues getDocValues(IndexReader r, final String field, final DocValuesPuller puller) throws IOException { - if (r instanceof AtomicIndexReader) { + if (r instanceof AtomicReader) { // already an atomic reader - return puller.pull((AtomicIndexReader) r, field); + return puller.pull((AtomicReader) r, field); } - assert r instanceof CompositeIndexReader; - final IndexReader[] subs = ((CompositeIndexReader) r).getSequentialSubReaders(); + assert r instanceof CompositeReader; + final IndexReader[] subs = ((CompositeReader) r).getSequentialSubReaders(); if (subs.length == 0) { // no fields return null; @@ -138,7 +138,7 @@ public class MultiDocValues extends DocValues { new ReaderUtil.Gather(r) { boolean stop = false; @Override - protected void add(int base, AtomicIndexReader r) throws IOException { + protected void add(int base, AtomicReader r) throws IOException { if (stop) { return; } diff --git a/lucene/src/java/org/apache/lucene/index/MultiFields.java b/lucene/src/java/org/apache/lucene/index/MultiFields.java index ee3444be37c..ea0ded43169 100644 --- a/lucene/src/java/org/apache/lucene/index/MultiFields.java +++ b/lucene/src/java/org/apache/lucene/index/MultiFields.java @@ -61,12 +61,12 @@ public final class MultiFields extends Fields { * Gather}) and iterate through them * yourself. */ public static Fields getFields(IndexReader r) throws IOException { - if (r instanceof AtomicIndexReader) { + if (r instanceof AtomicReader) { // already an atomic reader - return ((AtomicIndexReader) r).fields(); + return ((AtomicReader) r).fields(); } - assert r instanceof CompositeIndexReader; - final IndexReader[] subs = ((CompositeIndexReader) r).getSequentialSubReaders(); + assert r instanceof CompositeReader; + final IndexReader[] subs = ((CompositeReader) r).getSequentialSubReaders(); if (subs.length == 0) { // no fields return null; @@ -76,7 +76,7 @@ public final class MultiFields extends Fields { new ReaderUtil.Gather(r) { @Override - protected void add(int base, AtomicIndexReader r) throws IOException { + protected void add(int base, AtomicReader r) throws IOException { final Fields f = r.fields(); if (f != null) { fields.add(f); @@ -104,7 +104,7 @@ public final class MultiFields extends Fields { try { final int maxDoc = new ReaderUtil.Gather(r) { @Override - protected void add(int base, AtomicIndexReader r) throws IOException { + protected void add(int base, AtomicReader r) throws IOException { // record all liveDocs, even if they are null liveDocs.add(r.getLiveDocs()); starts.add(base); @@ -246,10 +246,10 @@ public final class MultiFields extends Fields { /** Call this to get the (merged) FieldInfos for a * composite reader */ public static FieldInfos getMergedFieldInfos(IndexReader reader) { - final List subReaders = new ArrayList(); + final List subReaders = new ArrayList(); ReaderUtil.gatherSubReaders(subReaders, reader); final FieldInfos fieldInfos = new FieldInfos(); - for(AtomicIndexReader subReader : subReaders) { + for(AtomicReader subReader : subReaders) { fieldInfos.add(subReader.getFieldInfos()); } return fieldInfos; diff --git a/lucene/src/java/org/apache/lucene/index/ParallelReader.java b/lucene/src/java/org/apache/lucene/index/ParallelReader.java index f46ab4eab76..6f99aca03a9 100644 --- a/lucene/src/java/org/apache/lucene/index/ParallelReader.java +++ b/lucene/src/java/org/apache/lucene/index/ParallelReader.java @@ -41,13 +41,13 @@ import org.apache.lucene.util.BytesRef; * same order to the other indexes. Failure to do so will result in * undefined behavior. */ -public class ParallelReader extends AtomicIndexReader { - private List readers = new ArrayList(); +public class ParallelReader extends AtomicReader { + private List readers = new ArrayList(); private List decrefOnClose = new ArrayList(); // remember which subreaders to decRef on close boolean incRefReaders = false; - private SortedMap fieldToReader = new TreeMap(); - private Map> readerToFields = new HashMap>(); - private List storedFieldReaders = new ArrayList(); + private SortedMap fieldToReader = new TreeMap(); + private Map> readerToFields = new HashMap>(); + private List storedFieldReaders = new ArrayList(); private Map normsCache = new HashMap(); private int maxDoc; private int numDocs; @@ -75,7 +75,7 @@ public class ParallelReader extends AtomicIndexReader { @Override public String toString() { final StringBuilder buffer = new StringBuilder("ParallelReader("); - final Iterator iter = readers.iterator(); + final Iterator iter = readers.iterator(); if (iter.hasNext()) { buffer.append(iter.next()); } @@ -89,7 +89,7 @@ public class ParallelReader extends AtomicIndexReader { /** Add an AtomicIndexReader. * @throws IOException if there is a low-level IO error */ - public void add(AtomicIndexReader reader) throws IOException { + public void add(AtomicReader reader) throws IOException { ensureOpen(); add(reader, false); } @@ -101,10 +101,10 @@ public class ParallelReader extends AtomicIndexReader { * @throws IllegalArgumentException if not all indexes contain the same number * of documents * @throws IllegalArgumentException if not all indexes have the same value - * of {@link AtomicIndexReader#maxDoc()} + * of {@link AtomicReader#maxDoc()} * @throws IOException if there is a low-level IO error */ - public void add(AtomicIndexReader reader, boolean ignoreStoredFields) + public void add(AtomicReader reader, boolean ignoreStoredFields) throws IOException { ensureOpen(); @@ -233,7 +233,7 @@ public class ParallelReader extends AtomicIndexReader { @Override public void document(int docID, StoredFieldVisitor visitor) throws CorruptIndexException, IOException { ensureOpen(); - for (final AtomicIndexReader reader: storedFieldReaders) { + for (final AtomicReader reader: storedFieldReaders) { reader.document(docID, visitor); } } @@ -243,7 +243,7 @@ public class ParallelReader extends AtomicIndexReader { public Fields getTermVectors(int docID) throws IOException { ensureOpen(); ParallelFields fields = new ParallelFields(); - for (Map.Entry ent : fieldToReader.entrySet()) { + for (Map.Entry ent : fieldToReader.entrySet()) { String fieldName = ent.getKey(); Terms vector = ent.getValue().getTermVector(docID, fieldName); if (vector != null) { @@ -257,20 +257,20 @@ public class ParallelReader extends AtomicIndexReader { @Override public boolean hasNorms(String field) throws IOException { ensureOpen(); - AtomicIndexReader reader = fieldToReader.get(field); + AtomicReader reader = fieldToReader.get(field); return reader==null ? false : reader.hasNorms(field); } @Override public int docFreq(String field, BytesRef term) throws IOException { ensureOpen(); - AtomicIndexReader reader = fieldToReader.get(field); + AtomicReader reader = fieldToReader.get(field); return reader == null? 0 : reader.docFreq(field, term); } // for testing - AtomicIndexReader[] getSubReaders() { - return readers.toArray(new AtomicIndexReader[readers.size()]); + AtomicReader[] getSubReaders() { + return readers.toArray(new AtomicReader[readers.size()]); } @Override @@ -287,7 +287,7 @@ public class ParallelReader extends AtomicIndexReader { // TODO: I suspect this is completely untested!!!!! @Override public DocValues docValues(String field) throws IOException { - AtomicIndexReader reader = fieldToReader.get(field); + AtomicReader reader = fieldToReader.get(field); return reader == null ? null : reader.docValues(field); } @@ -296,7 +296,7 @@ public class ParallelReader extends AtomicIndexReader { public synchronized DocValues normValues(String field) throws IOException { DocValues values = normsCache.get(field); if (values == null) { - AtomicIndexReader reader = fieldToReader.get(field); + AtomicReader reader = fieldToReader.get(field); values = reader == null ? null : reader.normValues(field); normsCache.put(field, values); } diff --git a/lucene/src/java/org/apache/lucene/index/SegmentMerger.java b/lucene/src/java/org/apache/lucene/index/SegmentMerger.java index 8bb1d91eae2..8bd72778a61 100644 --- a/lucene/src/java/org/apache/lucene/index/SegmentMerger.java +++ b/lucene/src/java/org/apache/lucene/index/SegmentMerger.java @@ -76,7 +76,7 @@ final class SegmentMerger { try { new ReaderUtil.Gather(reader) { @Override - protected void add(int base, AtomicIndexReader r) { + protected void add(int base, AtomicReader r) { mergeState.readers.add(new MergeState.IndexReaderAndLiveDocs(r, r.getLiveDocs())); } }.run(); @@ -201,7 +201,7 @@ final class SegmentMerger { Map normValuesTypes = new HashMap(); for (MergeState.IndexReaderAndLiveDocs readerAndLiveDocs : mergeState.readers) { - final AtomicIndexReader reader = readerAndLiveDocs.reader; + final AtomicReader reader = readerAndLiveDocs.reader; FieldInfos readerFieldInfos = reader.getFieldInfos(); for (FieldInfo fi : readerFieldInfos) { FieldInfo merged = mergeState.fieldInfos.add(fi); diff --git a/lucene/src/java/org/apache/lucene/index/SegmentReader.java b/lucene/src/java/org/apache/lucene/index/SegmentReader.java index 1403f4152fb..40fa7db3e3a 100644 --- a/lucene/src/java/org/apache/lucene/index/SegmentReader.java +++ b/lucene/src/java/org/apache/lucene/index/SegmentReader.java @@ -30,7 +30,7 @@ import org.apache.lucene.util.Bits; /** * @lucene.experimental */ -public final class SegmentReader extends AtomicIndexReader { +public final class SegmentReader extends AtomicReader { private final SegmentInfo si; private final Bits liveDocs; diff --git a/lucene/src/java/org/apache/lucene/index/SlowCompositeReaderWrapper.java b/lucene/src/java/org/apache/lucene/index/SlowCompositeReaderWrapper.java index 5353bcbcbaa..b1e2faec6ea 100644 --- a/lucene/src/java/org/apache/lucene/index/SlowCompositeReaderWrapper.java +++ b/lucene/src/java/org/apache/lucene/index/SlowCompositeReaderWrapper.java @@ -50,27 +50,27 @@ import org.apache.lucene.index.MultiReader; // javadoc * yourself.

*/ -public final class SlowCompositeReaderWrapper extends AtomicIndexReader { +public final class SlowCompositeReaderWrapper extends AtomicReader { - private final CompositeIndexReader in; + private final CompositeReader in; private final Map normsCache = new HashMap(); private final Fields fields; private final Bits liveDocs; - /** This method is sugar for getting an {@link AtomicIndexReader} from + /** This method is sugar for getting an {@link AtomicReader} from * an {@link IndexReader} of any kind. If the reader is already atomic, * it is returned unchanged, otherwise wrapped by this class. */ - public static AtomicIndexReader wrap(IndexReader reader) throws IOException { - if (reader instanceof CompositeIndexReader) { - return new SlowCompositeReaderWrapper((CompositeIndexReader) reader); + public static AtomicReader wrap(IndexReader reader) throws IOException { + if (reader instanceof CompositeReader) { + return new SlowCompositeReaderWrapper((CompositeReader) reader); } else { - assert reader instanceof AtomicIndexReader; - return (AtomicIndexReader) reader; + assert reader instanceof AtomicReader; + return (AtomicReader) reader; } } - public SlowCompositeReaderWrapper(CompositeIndexReader reader) throws IOException { + public SlowCompositeReaderWrapper(CompositeReader reader) throws IOException { super(); in = reader; fields = MultiFields.getFields(in); diff --git a/lucene/src/java/org/apache/lucene/search/BooleanQuery.java b/lucene/src/java/org/apache/lucene/search/BooleanQuery.java index fc38d168eff..bbb4617862d 100644 --- a/lucene/src/java/org/apache/lucene/search/BooleanQuery.java +++ b/lucene/src/java/org/apache/lucene/search/BooleanQuery.java @@ -21,7 +21,7 @@ import java.io.IOException; import java.util.*; import org.apache.lucene.index.DocsEnum; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.Term; import org.apache.lucene.index.TermsEnum; diff --git a/lucene/src/java/org/apache/lucene/search/BooleanScorer.java b/lucene/src/java/org/apache/lucene/search/BooleanScorer.java index e2d98dc847d..e9fd28e35ce 100644 --- a/lucene/src/java/org/apache/lucene/search/BooleanScorer.java +++ b/lucene/src/java/org/apache/lucene/search/BooleanScorer.java @@ -22,7 +22,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.BooleanClause.Occur; import org.apache.lucene.search.BooleanQuery.BooleanWeight; diff --git a/lucene/src/java/org/apache/lucene/search/CachingCollector.java b/lucene/src/java/org/apache/lucene/search/CachingCollector.java index 9be4494f306..f0a637db673 100644 --- a/lucene/src/java/org/apache/lucene/search/CachingCollector.java +++ b/lucene/src/java/org/apache/lucene/search/CachingCollector.java @@ -17,7 +17,7 @@ package org.apache.lucene.search; * limitations under the License. */ -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.util.RamUsageEstimator; import java.io.IOException; diff --git a/lucene/src/java/org/apache/lucene/search/CachingWrapperFilter.java b/lucene/src/java/org/apache/lucene/search/CachingWrapperFilter.java index 879ba758356..8303b2c8fa3 100644 --- a/lucene/src/java/org/apache/lucene/search/CachingWrapperFilter.java +++ b/lucene/src/java/org/apache/lucene/search/CachingWrapperFilter.java @@ -22,8 +22,8 @@ import java.util.Collections; import java.util.Map; import java.util.WeakHashMap; -import org.apache.lucene.index.AtomicIndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.util.FixedBitSet; import org.apache.lucene.util.Bits; @@ -76,7 +76,7 @@ public class CachingWrapperFilter extends Filter { * returns true, else it copies the {@link DocIdSetIterator} into * a {@link FixedBitSet}. */ - protected DocIdSet docIdSetToCache(DocIdSet docIdSet, AtomicIndexReader reader) throws IOException { + protected DocIdSet docIdSetToCache(DocIdSet docIdSet, AtomicReader reader) throws IOException { if (docIdSet == null) { // this is better than returning null, as the nonnull result can be cached return DocIdSet.EMPTY_DOCIDSET; @@ -102,7 +102,7 @@ public class CachingWrapperFilter extends Filter { @Override public DocIdSet getDocIdSet(AtomicReaderContext context, final Bits acceptDocs) throws IOException { - final AtomicIndexReader reader = context.reader(); + final AtomicReader reader = context.reader(); // Only cache if incoming acceptDocs is == live docs; // if Lucene passes in more interesting acceptDocs in diff --git a/lucene/src/java/org/apache/lucene/search/Collector.java b/lucene/src/java/org/apache/lucene/search/Collector.java index 2f507f1d81d..b457c156932 100644 --- a/lucene/src/java/org/apache/lucene/search/Collector.java +++ b/lucene/src/java/org/apache/lucene/search/Collector.java @@ -19,7 +19,7 @@ package org.apache.lucene.search; import java.io.IOException; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.ReaderContext; /** diff --git a/lucene/src/java/org/apache/lucene/search/ConstantScoreQuery.java b/lucene/src/java/org/apache/lucene/search/ConstantScoreQuery.java index 47fd557645d..d98b9c2e071 100644 --- a/lucene/src/java/org/apache/lucene/search/ConstantScoreQuery.java +++ b/lucene/src/java/org/apache/lucene/search/ConstantScoreQuery.java @@ -18,7 +18,7 @@ package org.apache.lucene.search; */ import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Term; import org.apache.lucene.util.Bits; import org.apache.lucene.util.ToStringUtils; diff --git a/lucene/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java b/lucene/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java index bc509492d7e..4ebd7d1833c 100644 --- a/lucene/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java +++ b/lucene/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java @@ -23,7 +23,7 @@ import java.util.Iterator; import java.util.Set; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Term; import org.apache.lucene.util.Bits; diff --git a/lucene/src/java/org/apache/lucene/search/FieldCache.java b/lucene/src/java/org/apache/lucene/search/FieldCache.java index 882e7905797..27c432a4cfc 100644 --- a/lucene/src/java/org/apache/lucene/search/FieldCache.java +++ b/lucene/src/java/org/apache/lucene/search/FieldCache.java @@ -24,7 +24,7 @@ import java.text.DecimalFormat; import org.apache.lucene.analysis.NumericTokenStream; // for javadocs import org.apache.lucene.document.NumericField; // for javadocs import org.apache.lucene.index.DocTermOrds; -import org.apache.lucene.index.AtomicIndexReader; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.TermsEnum; import org.apache.lucene.util.Bits; import org.apache.lucene.util.BytesRef; @@ -63,7 +63,7 @@ public interface FieldCache { } /** Interface to parse bytes from document fields. - * @see FieldCache#getBytes(AtomicIndexReader, String, FieldCache.ByteParser, boolean) + * @see FieldCache#getBytes(AtomicReader, String, FieldCache.ByteParser, boolean) */ public interface ByteParser extends Parser { /** Return a single Byte representation of this field's value. */ @@ -71,7 +71,7 @@ public interface FieldCache { } /** Interface to parse shorts from document fields. - * @see FieldCache#getShorts(AtomicIndexReader, String, FieldCache.ShortParser, boolean) + * @see FieldCache#getShorts(AtomicReader, String, FieldCache.ShortParser, boolean) */ public interface ShortParser extends Parser { /** Return a short representation of this field's value. */ @@ -79,7 +79,7 @@ public interface FieldCache { } /** Interface to parse ints from document fields. - * @see FieldCache#getInts(AtomicIndexReader, String, FieldCache.IntParser, boolean) + * @see FieldCache#getInts(AtomicReader, String, FieldCache.IntParser, boolean) */ public interface IntParser extends Parser { /** Return an integer representation of this field's value. */ @@ -87,7 +87,7 @@ public interface FieldCache { } /** Interface to parse floats from document fields. - * @see FieldCache#getFloats(AtomicIndexReader, String, FieldCache.FloatParser, boolean) + * @see FieldCache#getFloats(AtomicReader, String, FieldCache.FloatParser, boolean) */ public interface FloatParser extends Parser { /** Return an float representation of this field's value. */ @@ -95,7 +95,7 @@ public interface FieldCache { } /** Interface to parse long from document fields. - * @see FieldCache#getLongs(AtomicIndexReader, String, FieldCache.LongParser, boolean) + * @see FieldCache#getLongs(AtomicReader, String, FieldCache.LongParser, boolean) */ public interface LongParser extends Parser { /** Return an long representation of this field's value. */ @@ -103,7 +103,7 @@ public interface FieldCache { } /** Interface to parse doubles from document fields. - * @see FieldCache#getDoubles(AtomicIndexReader, String, FieldCache.DoubleParser, boolean) + * @see FieldCache#getDoubles(AtomicReader, String, FieldCache.DoubleParser, boolean) */ public interface DoubleParser extends Parser { /** Return an long representation of this field's value. */ @@ -303,7 +303,7 @@ public interface FieldCache { * reader.maxDoc(), with turned on bits for each docid that * does have a value for this field. */ - public Bits getDocsWithField(AtomicIndexReader reader, String field) + public Bits getDocsWithField(AtomicReader reader, String field) throws IOException; /** Checks the internal cache for an appropriate entry, and if none is @@ -317,7 +317,7 @@ public interface FieldCache { * @return The values in the given field for each document. * @throws IOException If any error occurs. */ - public byte[] getBytes (AtomicIndexReader reader, String field, boolean setDocsWithField) + public byte[] getBytes (AtomicReader reader, String field, boolean setDocsWithField) throws IOException; /** Checks the internal cache for an appropriate entry, and if none is found, @@ -332,7 +332,7 @@ public interface FieldCache { * @return The values in the given field for each document. * @throws IOException If any error occurs. */ - public byte[] getBytes (AtomicIndexReader reader, String field, ByteParser parser, boolean setDocsWithField) + public byte[] getBytes (AtomicReader reader, String field, ByteParser parser, boolean setDocsWithField) throws IOException; /** Checks the internal cache for an appropriate entry, and if none is @@ -346,7 +346,7 @@ public interface FieldCache { * @return The values in the given field for each document. * @throws IOException If any error occurs. */ - public short[] getShorts (AtomicIndexReader reader, String field, boolean setDocsWithField) + public short[] getShorts (AtomicReader reader, String field, boolean setDocsWithField) throws IOException; /** Checks the internal cache for an appropriate entry, and if none is found, @@ -361,7 +361,7 @@ public interface FieldCache { * @return The values in the given field for each document. * @throws IOException If any error occurs. */ - public short[] getShorts (AtomicIndexReader reader, String field, ShortParser parser, boolean setDocsWithField) + public short[] getShorts (AtomicReader reader, String field, ShortParser parser, boolean setDocsWithField) throws IOException; /** Checks the internal cache for an appropriate entry, and if none is @@ -375,7 +375,7 @@ public interface FieldCache { * @return The values in the given field for each document. * @throws IOException If any error occurs. */ - public int[] getInts (AtomicIndexReader reader, String field, boolean setDocsWithField) + public int[] getInts (AtomicReader reader, String field, boolean setDocsWithField) throws IOException; /** Checks the internal cache for an appropriate entry, and if none is found, @@ -390,7 +390,7 @@ public interface FieldCache { * @return The values in the given field for each document. * @throws IOException If any error occurs. */ - public int[] getInts (AtomicIndexReader reader, String field, IntParser parser, boolean setDocsWithField) + public int[] getInts (AtomicReader reader, String field, IntParser parser, boolean setDocsWithField) throws IOException; /** Checks the internal cache for an appropriate entry, and if @@ -404,7 +404,7 @@ public interface FieldCache { * @return The values in the given field for each document. * @throws IOException If any error occurs. */ - public float[] getFloats (AtomicIndexReader reader, String field, boolean setDocsWithField) + public float[] getFloats (AtomicReader reader, String field, boolean setDocsWithField) throws IOException; /** Checks the internal cache for an appropriate entry, and if @@ -419,7 +419,7 @@ public interface FieldCache { * @return The values in the given field for each document. * @throws IOException If any error occurs. */ - public float[] getFloats (AtomicIndexReader reader, String field, + public float[] getFloats (AtomicReader reader, String field, FloatParser parser, boolean setDocsWithField) throws IOException; /** @@ -435,7 +435,7 @@ public interface FieldCache { * @return The values in the given field for each document. * @throws java.io.IOException If any error occurs. */ - public long[] getLongs(AtomicIndexReader reader, String field, boolean setDocsWithField) + public long[] getLongs(AtomicReader reader, String field, boolean setDocsWithField) throws IOException; /** @@ -452,7 +452,7 @@ public interface FieldCache { * @return The values in the given field for each document. * @throws IOException If any error occurs. */ - public long[] getLongs(AtomicIndexReader reader, String field, LongParser parser, boolean setDocsWithField) + public long[] getLongs(AtomicReader reader, String field, LongParser parser, boolean setDocsWithField) throws IOException; /** @@ -468,7 +468,7 @@ public interface FieldCache { * @return The values in the given field for each document. * @throws IOException If any error occurs. */ - public double[] getDoubles(AtomicIndexReader reader, String field, boolean setDocsWithField) + public double[] getDoubles(AtomicReader reader, String field, boolean setDocsWithField) throws IOException; /** @@ -485,7 +485,7 @@ public interface FieldCache { * @return The values in the given field for each document. * @throws IOException If any error occurs. */ - public double[] getDoubles(AtomicIndexReader reader, String field, DoubleParser parser, boolean setDocsWithField) + public double[] getDoubles(AtomicReader reader, String field, DoubleParser parser, boolean setDocsWithField) throws IOException; /** Returned by {@link #getTerms} */ @@ -513,15 +513,15 @@ public interface FieldCache { * @return The values in the given field for each document. * @throws IOException If any error occurs. */ - public DocTerms getTerms (AtomicIndexReader reader, String field) + public DocTerms getTerms (AtomicReader reader, String field) throws IOException; - /** Expert: just like {@link #getTerms(AtomicIndexReader,String)}, + /** Expert: just like {@link #getTerms(AtomicReader,String)}, * but you can specify whether more RAM should be consumed in exchange for * faster lookups (default is "true"). Note that the * first call for a given reader and field "wins", * subsequent calls will share the same cache entry. */ - public DocTerms getTerms (AtomicIndexReader reader, String field, boolean fasterButMoreRAM) + public DocTerms getTerms (AtomicReader reader, String field, boolean fasterButMoreRAM) throws IOException; /** Returned by {@link #getTermsIndex} */ @@ -589,16 +589,16 @@ public interface FieldCache { * @return The values in the given field for each document. * @throws IOException If any error occurs. */ - public DocTermsIndex getTermsIndex (AtomicIndexReader reader, String field) + public DocTermsIndex getTermsIndex (AtomicReader reader, String field) throws IOException; /** Expert: just like {@link - * #getTermsIndex(AtomicIndexReader,String)}, but you can specify + * #getTermsIndex(AtomicReader,String)}, but you can specify * whether more RAM should be consumed in exchange for * faster lookups (default is "true"). Note that the * first call for a given reader and field "wins", * subsequent calls will share the same cache entry. */ - public DocTermsIndex getTermsIndex (AtomicIndexReader reader, String field, boolean fasterButMoreRAM) + public DocTermsIndex getTermsIndex (AtomicReader reader, String field, boolean fasterButMoreRAM) throws IOException; /** @@ -611,7 +611,7 @@ public interface FieldCache { * @return a {@link DocTermOrds} instance * @throws IOException If any error occurs. */ - public DocTermOrds getDocTermOrds(AtomicIndexReader reader, String field) throws IOException; + public DocTermOrds getDocTermOrds(AtomicReader reader, String field) throws IOException; /** * EXPERT: A unique Identifier/Description for each item in the FieldCache. @@ -705,7 +705,7 @@ public interface FieldCache { * top-level reader, it usually will have no effect as * Lucene now caches at the segment reader level. */ - public abstract void purge(AtomicIndexReader r); + public abstract void purge(AtomicReader r); /** * If non-null, FieldCacheImpl will warn whenever diff --git a/lucene/src/java/org/apache/lucene/search/FieldCacheImpl.java b/lucene/src/java/org/apache/lucene/search/FieldCacheImpl.java index 0d08b5c097b..a8e34e7718b 100644 --- a/lucene/src/java/org/apache/lucene/search/FieldCacheImpl.java +++ b/lucene/src/java/org/apache/lucene/search/FieldCacheImpl.java @@ -29,7 +29,7 @@ import java.util.WeakHashMap; import org.apache.lucene.index.DocTermOrds; import org.apache.lucene.index.DocsAndPositionsEnum; import org.apache.lucene.index.DocsEnum; -import org.apache.lucene.index.AtomicIndexReader; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.OrdTermState; import org.apache.lucene.index.SegmentReader; @@ -75,7 +75,7 @@ class FieldCacheImpl implements FieldCache { init(); } - public synchronized void purge(AtomicIndexReader r) { + public synchronized void purge(AtomicReader r) { for(Cache c : caches.values()) { c.purge(r); } @@ -154,23 +154,23 @@ class FieldCacheImpl implements FieldCache { }; // composite/SlowMultiReaderWrapper fieldcaches don't purge until composite reader is closed. - final AtomicIndexReader.ReaderClosedListener purgeReader = new AtomicIndexReader.ReaderClosedListener() { + final IndexReader.ReaderClosedListener purgeReader = new IndexReader.ReaderClosedListener() { @Override public void onClose(IndexReader owner) { - assert owner instanceof AtomicIndexReader; - FieldCacheImpl.this.purge((AtomicIndexReader) owner); + assert owner instanceof AtomicReader; + FieldCacheImpl.this.purge((AtomicReader) owner); } }; - private void initReader(AtomicIndexReader reader) { + private void initReader(AtomicReader reader) { if (reader instanceof SegmentReader) { ((SegmentReader) reader).addCoreClosedListener(purgeCore); } else { // we have a slow reader of some sort, try to register a purge event // rather than relying on gc: Object key = reader.getCoreCacheKey(); - if (key instanceof AtomicIndexReader) { - ((AtomicIndexReader)key).addReaderClosedListener(purgeReader); + if (key instanceof AtomicReader) { + ((AtomicReader)key).addReaderClosedListener(purgeReader); } else { // last chance reader.addReaderClosedListener(purgeReader); @@ -189,11 +189,11 @@ class FieldCacheImpl implements FieldCache { final Map> readerCache = new WeakHashMap>(); - protected abstract Object createValue(AtomicIndexReader reader, Entry key, boolean setDocsWithField) + protected abstract Object createValue(AtomicReader reader, Entry key, boolean setDocsWithField) throws IOException; /** Remove this reader from the cache, if present. */ - public void purge(AtomicIndexReader r) { + public void purge(AtomicReader r) { Object readerKey = r.getCoreCacheKey(); synchronized(readerCache) { readerCache.remove(readerKey); @@ -202,7 +202,7 @@ class FieldCacheImpl implements FieldCache { /** Sets the key to the value for the provided reader; * if the key is already set then this doesn't change it. */ - public void put(AtomicIndexReader reader, Entry key, Object value) { + public void put(AtomicReader reader, Entry key, Object value) { final Object readerKey = reader.getCoreCacheKey(); synchronized (readerCache) { Map innerCache = readerCache.get(readerKey); @@ -221,7 +221,7 @@ class FieldCacheImpl implements FieldCache { } } - public Object get(AtomicIndexReader reader, Entry key, boolean setDocsWithField) throws IOException { + public Object get(AtomicReader reader, Entry key, boolean setDocsWithField) throws IOException { Map innerCache; Object value; final Object readerKey = reader.getCoreCacheKey(); @@ -319,12 +319,12 @@ class FieldCacheImpl implements FieldCache { } // inherit javadocs - public byte[] getBytes (AtomicIndexReader reader, String field, boolean setDocsWithField) throws IOException { + public byte[] getBytes (AtomicReader reader, String field, boolean setDocsWithField) throws IOException { return getBytes(reader, field, null, setDocsWithField); } // inherit javadocs - public byte[] getBytes(AtomicIndexReader reader, String field, ByteParser parser, boolean setDocsWithField) + public byte[] getBytes(AtomicReader reader, String field, ByteParser parser, boolean setDocsWithField) throws IOException { return (byte[]) caches.get(Byte.TYPE).get(reader, new Entry(field, parser), setDocsWithField); } @@ -334,7 +334,7 @@ class FieldCacheImpl implements FieldCache { super(wrapper); } @Override - protected Object createValue(AtomicIndexReader reader, Entry entryKey, boolean setDocsWithField) + protected Object createValue(AtomicReader reader, Entry entryKey, boolean setDocsWithField) throws IOException { String field = entryKey.field; ByteParser parser = (ByteParser) entryKey.custom; @@ -391,12 +391,12 @@ class FieldCacheImpl implements FieldCache { } // inherit javadocs - public short[] getShorts (AtomicIndexReader reader, String field, boolean setDocsWithField) throws IOException { + public short[] getShorts (AtomicReader reader, String field, boolean setDocsWithField) throws IOException { return getShorts(reader, field, null, setDocsWithField); } // inherit javadocs - public short[] getShorts(AtomicIndexReader reader, String field, ShortParser parser, boolean setDocsWithField) + public short[] getShorts(AtomicReader reader, String field, ShortParser parser, boolean setDocsWithField) throws IOException { return (short[]) caches.get(Short.TYPE).get(reader, new Entry(field, parser), setDocsWithField); } @@ -407,7 +407,7 @@ class FieldCacheImpl implements FieldCache { } @Override - protected Object createValue(AtomicIndexReader reader, Entry entryKey, boolean setDocsWithField) + protected Object createValue(AtomicReader reader, Entry entryKey, boolean setDocsWithField) throws IOException { String field = entryKey.field; ShortParser parser = (ShortParser) entryKey.custom; @@ -464,7 +464,7 @@ class FieldCacheImpl implements FieldCache { } // null Bits means no docs matched - void setDocsWithField(AtomicIndexReader reader, String field, Bits docsWithField) { + void setDocsWithField(AtomicReader reader, String field, Bits docsWithField) { final int maxDoc = reader.maxDoc(); final Bits bits; if (docsWithField == null) { @@ -485,12 +485,12 @@ class FieldCacheImpl implements FieldCache { } // inherit javadocs - public int[] getInts (AtomicIndexReader reader, String field, boolean setDocsWithField) throws IOException { + public int[] getInts (AtomicReader reader, String field, boolean setDocsWithField) throws IOException { return getInts(reader, field, null, setDocsWithField); } // inherit javadocs - public int[] getInts(AtomicIndexReader reader, String field, IntParser parser, boolean setDocsWithField) + public int[] getInts(AtomicReader reader, String field, IntParser parser, boolean setDocsWithField) throws IOException { return (int[]) caches.get(Integer.TYPE).get(reader, new Entry(field, parser), setDocsWithField); } @@ -501,7 +501,7 @@ class FieldCacheImpl implements FieldCache { } @Override - protected Object createValue(AtomicIndexReader reader, Entry entryKey, boolean setDocsWithField) + protected Object createValue(AtomicReader reader, Entry entryKey, boolean setDocsWithField) throws IOException { String field = entryKey.field; IntParser parser = (IntParser) entryKey.custom; @@ -572,7 +572,7 @@ class FieldCacheImpl implements FieldCache { } } - public Bits getDocsWithField(AtomicIndexReader reader, String field) + public Bits getDocsWithField(AtomicReader reader, String field) throws IOException { return (Bits) caches.get(DocsWithFieldCache.class).get(reader, new Entry(field, null), false); } @@ -583,7 +583,7 @@ class FieldCacheImpl implements FieldCache { } @Override - protected Object createValue(AtomicIndexReader reader, Entry entryKey, boolean setDocsWithField /* ignored */) + protected Object createValue(AtomicReader reader, Entry entryKey, boolean setDocsWithField /* ignored */) throws IOException { final String field = entryKey.field; FixedBitSet res = null; @@ -633,13 +633,13 @@ class FieldCacheImpl implements FieldCache { } // inherit javadocs - public float[] getFloats (AtomicIndexReader reader, String field, boolean setDocsWithField) + public float[] getFloats (AtomicReader reader, String field, boolean setDocsWithField) throws IOException { return getFloats(reader, field, null, setDocsWithField); } // inherit javadocs - public float[] getFloats(AtomicIndexReader reader, String field, FloatParser parser, boolean setDocsWithField) + public float[] getFloats(AtomicReader reader, String field, FloatParser parser, boolean setDocsWithField) throws IOException { return (float[]) caches.get(Float.TYPE).get(reader, new Entry(field, parser), setDocsWithField); @@ -651,7 +651,7 @@ class FieldCacheImpl implements FieldCache { } @Override - protected Object createValue(AtomicIndexReader reader, Entry entryKey, boolean setDocsWithField) + protected Object createValue(AtomicReader reader, Entry entryKey, boolean setDocsWithField) throws IOException { String field = entryKey.field; FloatParser parser = (FloatParser) entryKey.custom; @@ -723,12 +723,12 @@ class FieldCacheImpl implements FieldCache { } - public long[] getLongs(AtomicIndexReader reader, String field, boolean setDocsWithField) throws IOException { + public long[] getLongs(AtomicReader reader, String field, boolean setDocsWithField) throws IOException { return getLongs(reader, field, null, setDocsWithField); } // inherit javadocs - public long[] getLongs(AtomicIndexReader reader, String field, FieldCache.LongParser parser, boolean setDocsWithField) + public long[] getLongs(AtomicReader reader, String field, FieldCache.LongParser parser, boolean setDocsWithField) throws IOException { return (long[]) caches.get(Long.TYPE).get(reader, new Entry(field, parser), setDocsWithField); } @@ -739,7 +739,7 @@ class FieldCacheImpl implements FieldCache { } @Override - protected Object createValue(AtomicIndexReader reader, Entry entryKey, boolean setDocsWithField) + protected Object createValue(AtomicReader reader, Entry entryKey, boolean setDocsWithField) throws IOException { String field = entryKey.field; FieldCache.LongParser parser = (FieldCache.LongParser) entryKey.custom; @@ -811,13 +811,13 @@ class FieldCacheImpl implements FieldCache { } // inherit javadocs - public double[] getDoubles(AtomicIndexReader reader, String field, boolean setDocsWithField) + public double[] getDoubles(AtomicReader reader, String field, boolean setDocsWithField) throws IOException { return getDoubles(reader, field, null, setDocsWithField); } // inherit javadocs - public double[] getDoubles(AtomicIndexReader reader, String field, FieldCache.DoubleParser parser, boolean setDocsWithField) + public double[] getDoubles(AtomicReader reader, String field, FieldCache.DoubleParser parser, boolean setDocsWithField) throws IOException { return (double[]) caches.get(Double.TYPE).get(reader, new Entry(field, parser), setDocsWithField); } @@ -828,7 +828,7 @@ class FieldCacheImpl implements FieldCache { } @Override - protected Object createValue(AtomicIndexReader reader, Entry entryKey, boolean setDocsWithField) + protected Object createValue(AtomicReader reader, Entry entryKey, boolean setDocsWithField) throws IOException { String field = entryKey.field; FieldCache.DoubleParser parser = (FieldCache.DoubleParser) entryKey.custom; @@ -1073,11 +1073,11 @@ class FieldCacheImpl implements FieldCache { private static boolean DEFAULT_FASTER_BUT_MORE_RAM = true; - public DocTermsIndex getTermsIndex(AtomicIndexReader reader, String field) throws IOException { + public DocTermsIndex getTermsIndex(AtomicReader reader, String field) throws IOException { return getTermsIndex(reader, field, DEFAULT_FASTER_BUT_MORE_RAM); } - public DocTermsIndex getTermsIndex(AtomicIndexReader reader, String field, boolean fasterButMoreRAM) throws IOException { + public DocTermsIndex getTermsIndex(AtomicReader reader, String field, boolean fasterButMoreRAM) throws IOException { return (DocTermsIndex) caches.get(DocTermsIndex.class).get(reader, new Entry(field, Boolean.valueOf(fasterButMoreRAM)), false); } @@ -1087,7 +1087,7 @@ class FieldCacheImpl implements FieldCache { } @Override - protected Object createValue(AtomicIndexReader reader, Entry entryKey, boolean setDocsWithField /* ignored */) + protected Object createValue(AtomicReader reader, Entry entryKey, boolean setDocsWithField /* ignored */) throws IOException { Terms terms = reader.terms(entryKey.field); @@ -1218,11 +1218,11 @@ class FieldCacheImpl implements FieldCache { // TODO: this if DocTermsIndex was already created, we // should share it... - public DocTerms getTerms(AtomicIndexReader reader, String field) throws IOException { + public DocTerms getTerms(AtomicReader reader, String field) throws IOException { return getTerms(reader, field, DEFAULT_FASTER_BUT_MORE_RAM); } - public DocTerms getTerms(AtomicIndexReader reader, String field, boolean fasterButMoreRAM) throws IOException { + public DocTerms getTerms(AtomicReader reader, String field, boolean fasterButMoreRAM) throws IOException { return (DocTerms) caches.get(DocTerms.class).get(reader, new Entry(field, Boolean.valueOf(fasterButMoreRAM)), false); } @@ -1232,7 +1232,7 @@ class FieldCacheImpl implements FieldCache { } @Override - protected Object createValue(AtomicIndexReader reader, Entry entryKey, boolean setDocsWithField /* ignored */) + protected Object createValue(AtomicReader reader, Entry entryKey, boolean setDocsWithField /* ignored */) throws IOException { Terms terms = reader.terms(entryKey.field); @@ -1306,7 +1306,7 @@ class FieldCacheImpl implements FieldCache { } } - public DocTermOrds getDocTermOrds(AtomicIndexReader reader, String field) throws IOException { + public DocTermOrds getDocTermOrds(AtomicReader reader, String field) throws IOException { return (DocTermOrds) caches.get(DocTermOrds.class).get(reader, new Entry(field, null), false); } @@ -1316,7 +1316,7 @@ class FieldCacheImpl implements FieldCache { } @Override - protected Object createValue(AtomicIndexReader reader, Entry entryKey, boolean setDocsWithField /* ignored */) + protected Object createValue(AtomicReader reader, Entry entryKey, boolean setDocsWithField /* ignored */) throws IOException { return new DocTermOrds(reader, entryKey.field); } diff --git a/lucene/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java b/lucene/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java index 8b8f8ac3748..1b907db9bff 100644 --- a/lucene/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java +++ b/lucene/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java @@ -19,7 +19,7 @@ package org.apache.lucene.search; import java.io.IOException; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.util.NumericUtils; import org.apache.lucene.util.Bits; import org.apache.lucene.util.BytesRef; diff --git a/lucene/src/java/org/apache/lucene/search/FieldCacheTermsFilter.java b/lucene/src/java/org/apache/lucene/search/FieldCacheTermsFilter.java index ce8c4068445..488da5ee22e 100644 --- a/lucene/src/java/org/apache/lucene/search/FieldCacheTermsFilter.java +++ b/lucene/src/java/org/apache/lucene/search/FieldCacheTermsFilter.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.apache.lucene.index.DocsEnum; // javadoc @link import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.util.FixedBitSet; import org.apache.lucene.util.Bits; import org.apache.lucene.util.BytesRef; diff --git a/lucene/src/java/org/apache/lucene/search/FieldComparator.java b/lucene/src/java/org/apache/lucene/search/FieldComparator.java index 2ba5361f746..ac8f78325d8 100644 --- a/lucene/src/java/org/apache/lucene/search/FieldComparator.java +++ b/lucene/src/java/org/apache/lucene/search/FieldComparator.java @@ -20,7 +20,7 @@ package org.apache.lucene.search; import java.io.IOException; import java.util.Comparator; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.DocValues; import org.apache.lucene.index.IndexReader; import org.apache.lucene.search.FieldCache.ByteParser; diff --git a/lucene/src/java/org/apache/lucene/search/FieldValueFilter.java b/lucene/src/java/org/apache/lucene/search/FieldValueFilter.java index 2a0824f49f8..6392fc9dd15 100644 --- a/lucene/src/java/org/apache/lucene/search/FieldValueFilter.java +++ b/lucene/src/java/org/apache/lucene/search/FieldValueFilter.java @@ -18,7 +18,7 @@ package org.apache.lucene.search; */ import java.io.IOException; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.util.Bits; import org.apache.lucene.util.Bits.MatchAllBits; import org.apache.lucene.util.Bits.MatchNoBits; diff --git a/lucene/src/java/org/apache/lucene/search/Filter.java b/lucene/src/java/org/apache/lucene/search/Filter.java index 457e7abfd43..c1afc06d53b 100644 --- a/lucene/src/java/org/apache/lucene/search/Filter.java +++ b/lucene/src/java/org/apache/lucene/search/Filter.java @@ -20,7 +20,7 @@ package org.apache.lucene.search; import java.io.IOException; import org.apache.lucene.index.IndexReader; // javadocs -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.util.Bits; /** diff --git a/lucene/src/java/org/apache/lucene/search/FilteredQuery.java b/lucene/src/java/org/apache/lucene/search/FilteredQuery.java index 69a28293143..b3cd29f188b 100644 --- a/lucene/src/java/org/apache/lucene/search/FilteredQuery.java +++ b/lucene/src/java/org/apache/lucene/search/FilteredQuery.java @@ -18,7 +18,7 @@ package org.apache.lucene.search; */ import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Term; import org.apache.lucene.util.Bits; import org.apache.lucene.util.ToStringUtils; diff --git a/lucene/src/java/org/apache/lucene/search/IndexSearcher.java b/lucene/src/java/org/apache/lucene/search/IndexSearcher.java index 229f835d9e1..943d3c19061 100644 --- a/lucene/src/java/org/apache/lucene/search/IndexSearcher.java +++ b/lucene/src/java/org/apache/lucene/search/IndexSearcher.java @@ -32,7 +32,7 @@ import java.util.concurrent.locks.ReentrantLock; import org.apache.lucene.document.Document; import org.apache.lucene.index.CorruptIndexException; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.ReaderContext; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.MultiFields; diff --git a/lucene/src/java/org/apache/lucene/search/MatchAllDocsQuery.java b/lucene/src/java/org/apache/lucene/search/MatchAllDocsQuery.java index bb572875170..134f666716a 100644 --- a/lucene/src/java/org/apache/lucene/search/MatchAllDocsQuery.java +++ b/lucene/src/java/org/apache/lucene/search/MatchAllDocsQuery.java @@ -18,7 +18,7 @@ package org.apache.lucene.search; */ import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Term; import org.apache.lucene.util.ToStringUtils; import org.apache.lucene.util.Bits; diff --git a/lucene/src/java/org/apache/lucene/search/MultiCollector.java b/lucene/src/java/org/apache/lucene/search/MultiCollector.java index 0976a4136bf..c0ee043ed53 100644 --- a/lucene/src/java/org/apache/lucene/search/MultiCollector.java +++ b/lucene/src/java/org/apache/lucene/search/MultiCollector.java @@ -19,7 +19,7 @@ package org.apache.lucene.search; import java.io.IOException; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.Collector; import org.apache.lucene.search.Scorer; diff --git a/lucene/src/java/org/apache/lucene/search/MultiPhraseQuery.java b/lucene/src/java/org/apache/lucene/search/MultiPhraseQuery.java index afb124a356e..dceed0a0d1a 100644 --- a/lucene/src/java/org/apache/lucene/search/MultiPhraseQuery.java +++ b/lucene/src/java/org/apache/lucene/search/MultiPhraseQuery.java @@ -22,8 +22,8 @@ import java.util.*; import org.apache.lucene.index.DocsAndPositionsEnum; import org.apache.lucene.index.DocsEnum; -import org.apache.lucene.index.AtomicIndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.ReaderContext; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.Term; @@ -178,7 +178,7 @@ public class MultiPhraseQuery extends Query { public Scorer scorer(AtomicReaderContext context, boolean scoreDocsInOrder, boolean topScorer, Bits acceptDocs) throws IOException { assert !termArrays.isEmpty(); - final AtomicIndexReader reader = context.reader(); + final AtomicReader reader = context.reader(); final Bits liveDocs = acceptDocs; PhraseQuery.PostingsAndFreq[] postingsFreqs = new PhraseQuery.PostingsAndFreq[termArrays.size()]; diff --git a/lucene/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java b/lucene/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java index fb86db8ee77..b92ec4df21f 100644 --- a/lucene/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java +++ b/lucene/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java @@ -21,8 +21,8 @@ import java.io.IOException; import org.apache.lucene.index.DocsEnum; import org.apache.lucene.index.Fields; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; -import org.apache.lucene.index.AtomicIndexReader; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.Terms; import org.apache.lucene.index.TermsEnum; import org.apache.lucene.util.FixedBitSet; @@ -83,7 +83,7 @@ public class MultiTermQueryWrapperFilter extends Filte */ @Override public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException { - final AtomicIndexReader reader = context.reader(); + final AtomicReader reader = context.reader(); final Fields fields = reader.fields(); if (fields == null) { // reader has no fields diff --git a/lucene/src/java/org/apache/lucene/search/PhraseQuery.java b/lucene/src/java/org/apache/lucene/search/PhraseQuery.java index 502ec433f98..d96f9063a59 100644 --- a/lucene/src/java/org/apache/lucene/search/PhraseQuery.java +++ b/lucene/src/java/org/apache/lucene/search/PhraseQuery.java @@ -22,10 +22,10 @@ import java.util.ArrayList; import java.util.Set; import org.apache.lucene.index.DocsAndPositionsEnum; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.ReaderContext; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.Term; import org.apache.lucene.index.TermState; import org.apache.lucene.index.Terms; @@ -220,7 +220,7 @@ public class PhraseQuery extends Query { public Scorer scorer(AtomicReaderContext context, boolean scoreDocsInOrder, boolean topScorer, Bits acceptDocs) throws IOException { assert !terms.isEmpty(); - final AtomicIndexReader reader = context.reader(); + final AtomicReader reader = context.reader(); final Bits liveDocs = acceptDocs; PostingsAndFreq[] postingsFreqs = new PostingsAndFreq[terms.size()]; @@ -271,7 +271,7 @@ public class PhraseQuery extends Query { } // only called from assert - private boolean termNotInReader(AtomicIndexReader reader, String field, BytesRef bytes) throws IOException { + private boolean termNotInReader(AtomicReader reader, String field, BytesRef bytes) throws IOException { return reader.docFreq(field, bytes) == 0; } diff --git a/lucene/src/java/org/apache/lucene/search/PositiveScoresOnlyCollector.java b/lucene/src/java/org/apache/lucene/search/PositiveScoresOnlyCollector.java index 8adc382fa82..2526667cffc 100644 --- a/lucene/src/java/org/apache/lucene/search/PositiveScoresOnlyCollector.java +++ b/lucene/src/java/org/apache/lucene/search/PositiveScoresOnlyCollector.java @@ -19,7 +19,7 @@ package org.apache.lucene.search; import java.io.IOException; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; /** * A {@link Collector} implementation which wraps another diff --git a/lucene/src/java/org/apache/lucene/search/QueryWrapperFilter.java b/lucene/src/java/org/apache/lucene/search/QueryWrapperFilter.java index e842d729692..669002c6cc4 100644 --- a/lucene/src/java/org/apache/lucene/search/QueryWrapperFilter.java +++ b/lucene/src/java/org/apache/lucene/search/QueryWrapperFilter.java @@ -19,7 +19,7 @@ package org.apache.lucene.search; import java.io.IOException; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.util.Bits; /** diff --git a/lucene/src/java/org/apache/lucene/search/TermCollectingRewrite.java b/lucene/src/java/org/apache/lucene/search/TermCollectingRewrite.java index 6fa761cb34f..505799093fd 100644 --- a/lucene/src/java/org/apache/lucene/search/TermCollectingRewrite.java +++ b/lucene/src/java/org/apache/lucene/search/TermCollectingRewrite.java @@ -25,7 +25,7 @@ import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.Term; import org.apache.lucene.index.Terms; import org.apache.lucene.index.TermsEnum; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.ReaderContext; import org.apache.lucene.util.AttributeSource; import org.apache.lucene.util.BytesRef; diff --git a/lucene/src/java/org/apache/lucene/search/TermQuery.java b/lucene/src/java/org/apache/lucene/search/TermQuery.java index 55d35187bf7..b04f95bf134 100644 --- a/lucene/src/java/org/apache/lucene/search/TermQuery.java +++ b/lucene/src/java/org/apache/lucene/search/TermQuery.java @@ -21,9 +21,9 @@ import java.io.IOException; import java.util.Set; import org.apache.lucene.index.DocsEnum; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.ReaderContext; -import org.apache.lucene.index.AtomicIndexReader; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.Term; import org.apache.lucene.index.TermState; import org.apache.lucene.index.TermsEnum; @@ -117,7 +117,7 @@ public class TermQuery extends Query { return termsEnum; } - private boolean termNotInReader(AtomicIndexReader reader, String field, BytesRef bytes) throws IOException { + private boolean termNotInReader(AtomicReader reader, String field, BytesRef bytes) throws IOException { // only called from assert //System.out.println("TQ.termNotInReader reader=" + reader + " term=" + field + ":" + bytes.utf8ToString()); return reader.docFreq(field, bytes) == 0; diff --git a/lucene/src/java/org/apache/lucene/search/TimeLimitingCollector.java b/lucene/src/java/org/apache/lucene/search/TimeLimitingCollector.java index e32b1e4f36c..e76aa4df276 100644 --- a/lucene/src/java/org/apache/lucene/search/TimeLimitingCollector.java +++ b/lucene/src/java/org/apache/lucene/search/TimeLimitingCollector.java @@ -19,7 +19,7 @@ package org.apache.lucene.search; import java.io.IOException; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.util.Counter; import org.apache.lucene.util.ThreadInterruptedException; diff --git a/lucene/src/java/org/apache/lucene/search/TopFieldCollector.java b/lucene/src/java/org/apache/lucene/search/TopFieldCollector.java index d80f50c0682..b3e998b3253 100644 --- a/lucene/src/java/org/apache/lucene/search/TopFieldCollector.java +++ b/lucene/src/java/org/apache/lucene/search/TopFieldCollector.java @@ -19,7 +19,7 @@ package org.apache.lucene.search; import java.io.IOException; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.FieldValueHitQueue.Entry; import org.apache.lucene.util.PriorityQueue; diff --git a/lucene/src/java/org/apache/lucene/search/TopScoreDocCollector.java b/lucene/src/java/org/apache/lucene/search/TopScoreDocCollector.java index 7863417b059..0e77fabfe60 100644 --- a/lucene/src/java/org/apache/lucene/search/TopScoreDocCollector.java +++ b/lucene/src/java/org/apache/lucene/search/TopScoreDocCollector.java @@ -19,7 +19,7 @@ package org.apache.lucene.search; import java.io.IOException; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; /** * A {@link Collector} implementation that collects the top-scoring hits, diff --git a/lucene/src/java/org/apache/lucene/search/TotalHitCountCollector.java b/lucene/src/java/org/apache/lucene/search/TotalHitCountCollector.java index fd9927a1ca6..b5a66adceab 100644 --- a/lucene/src/java/org/apache/lucene/search/TotalHitCountCollector.java +++ b/lucene/src/java/org/apache/lucene/search/TotalHitCountCollector.java @@ -17,7 +17,7 @@ package org.apache.lucene.search; * limitations under the License. */ -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; /** * Just counts the total number of hits. diff --git a/lucene/src/java/org/apache/lucene/search/Weight.java b/lucene/src/java/org/apache/lucene/search/Weight.java index 62d9ba21dda..60afd5043ae 100644 --- a/lucene/src/java/org/apache/lucene/search/Weight.java +++ b/lucene/src/java/org/apache/lucene/search/Weight.java @@ -20,7 +20,7 @@ package org.apache.lucene.search; import java.io.IOException; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.ReaderContext; import org.apache.lucene.search.similarities.SimilarityProvider; import org.apache.lucene.util.Bits; diff --git a/lucene/src/java/org/apache/lucene/search/payloads/PayloadNearQuery.java b/lucene/src/java/org/apache/lucene/search/payloads/PayloadNearQuery.java index 455191763d5..a218fe9c898 100644 --- a/lucene/src/java/org/apache/lucene/search/payloads/PayloadNearQuery.java +++ b/lucene/src/java/org/apache/lucene/search/payloads/PayloadNearQuery.java @@ -17,7 +17,7 @@ package org.apache.lucene.search.payloads; * limitations under the License. */ -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.ComplexExplanation; import org.apache.lucene.search.Explanation; import org.apache.lucene.search.Scorer; diff --git a/lucene/src/java/org/apache/lucene/search/payloads/PayloadSpanUtil.java b/lucene/src/java/org/apache/lucene/search/payloads/PayloadSpanUtil.java index 82b8a40fcd8..3b7eed49564 100644 --- a/lucene/src/java/org/apache/lucene/search/payloads/PayloadSpanUtil.java +++ b/lucene/src/java/org/apache/lucene/search/payloads/PayloadSpanUtil.java @@ -27,7 +27,7 @@ import java.util.Map; import java.util.TreeSet; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.ReaderContext; import org.apache.lucene.index.Term; import org.apache.lucene.search.BooleanClause; diff --git a/lucene/src/java/org/apache/lucene/search/payloads/PayloadTermQuery.java b/lucene/src/java/org/apache/lucene/search/payloads/PayloadTermQuery.java index 785574602be..ec6f12a98dc 100644 --- a/lucene/src/java/org/apache/lucene/search/payloads/PayloadTermQuery.java +++ b/lucene/src/java/org/apache/lucene/search/payloads/PayloadTermQuery.java @@ -17,7 +17,7 @@ package org.apache.lucene.search.payloads; * limitations under the License. */ -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Term; import org.apache.lucene.index.DocsAndPositionsEnum; import org.apache.lucene.search.IndexSearcher; diff --git a/lucene/src/java/org/apache/lucene/search/similarities/BM25Similarity.java b/lucene/src/java/org/apache/lucene/search/similarities/BM25Similarity.java index ff829a6aafc..954090cdaee 100644 --- a/lucene/src/java/org/apache/lucene/search/similarities/BM25Similarity.java +++ b/lucene/src/java/org/apache/lucene/search/similarities/BM25Similarity.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.apache.lucene.index.DocValues; import org.apache.lucene.index.FieldInvertState; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Norm; import org.apache.lucene.search.CollectionStatistics; import org.apache.lucene.search.Explanation; diff --git a/lucene/src/java/org/apache/lucene/search/similarities/MultiSimilarity.java b/lucene/src/java/org/apache/lucene/search/similarities/MultiSimilarity.java index 45ebef7603a..bdce932550a 100644 --- a/lucene/src/java/org/apache/lucene/search/similarities/MultiSimilarity.java +++ b/lucene/src/java/org/apache/lucene/search/similarities/MultiSimilarity.java @@ -20,7 +20,7 @@ package org.apache.lucene.search.similarities; import java.io.IOException; import org.apache.lucene.index.FieldInvertState; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Norm; import org.apache.lucene.search.CollectionStatistics; import org.apache.lucene.search.Explanation; diff --git a/lucene/src/java/org/apache/lucene/search/similarities/Similarity.java b/lucene/src/java/org/apache/lucene/search/similarities/Similarity.java index bf399f58f28..946c3b3250b 100644 --- a/lucene/src/java/org/apache/lucene/search/similarities/Similarity.java +++ b/lucene/src/java/org/apache/lucene/search/similarities/Similarity.java @@ -23,7 +23,7 @@ import java.io.IOException; import org.apache.lucene.document.DocValuesField; // javadoc import org.apache.lucene.index.FieldInvertState; import org.apache.lucene.index.IndexReader; // javadoc -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Norm; import org.apache.lucene.index.Terms; // javadoc import org.apache.lucene.search.BooleanQuery; diff --git a/lucene/src/java/org/apache/lucene/search/similarities/SimilarityBase.java b/lucene/src/java/org/apache/lucene/search/similarities/SimilarityBase.java index ab6b5bff1f5..f4e8ca7493e 100644 --- a/lucene/src/java/org/apache/lucene/search/similarities/SimilarityBase.java +++ b/lucene/src/java/org/apache/lucene/search/similarities/SimilarityBase.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.apache.lucene.index.DocValues; import org.apache.lucene.index.FieldInvertState; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Norm; import org.apache.lucene.search.CollectionStatistics; import org.apache.lucene.search.Explanation; diff --git a/lucene/src/java/org/apache/lucene/search/similarities/TFIDFSimilarity.java b/lucene/src/java/org/apache/lucene/search/similarities/TFIDFSimilarity.java index 3a05633c8a5..02e143afafe 100644 --- a/lucene/src/java/org/apache/lucene/search/similarities/TFIDFSimilarity.java +++ b/lucene/src/java/org/apache/lucene/search/similarities/TFIDFSimilarity.java @@ -21,7 +21,7 @@ package org.apache.lucene.search.similarities; import java.io.IOException; import org.apache.lucene.index.DocValues; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.CollectionStatistics; import org.apache.lucene.search.Explanation; import org.apache.lucene.search.IndexSearcher; diff --git a/lucene/src/java/org/apache/lucene/search/spans/FieldMaskingSpanQuery.java b/lucene/src/java/org/apache/lucene/search/spans/FieldMaskingSpanQuery.java index 4684562a0d6..df94ab1196a 100644 --- a/lucene/src/java/org/apache/lucene/search/spans/FieldMaskingSpanQuery.java +++ b/lucene/src/java/org/apache/lucene/search/spans/FieldMaskingSpanQuery.java @@ -22,7 +22,7 @@ import java.util.Map; import java.util.Set; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Term; import org.apache.lucene.search.Query; import org.apache.lucene.search.Weight; diff --git a/lucene/src/java/org/apache/lucene/search/spans/NearSpansOrdered.java b/lucene/src/java/org/apache/lucene/search/spans/NearSpansOrdered.java index b501e0ef138..7fcb3957837 100644 --- a/lucene/src/java/org/apache/lucene/search/spans/NearSpansOrdered.java +++ b/lucene/src/java/org/apache/lucene/search/spans/NearSpansOrdered.java @@ -18,7 +18,7 @@ package org.apache.lucene.search.spans; */ import org.apache.lucene.index.Term; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.util.ArrayUtil; import org.apache.lucene.util.Bits; import org.apache.lucene.util.TermContext; diff --git a/lucene/src/java/org/apache/lucene/search/spans/NearSpansUnordered.java b/lucene/src/java/org/apache/lucene/search/spans/NearSpansUnordered.java index fce3dc44f4d..d2bbd7946d2 100644 --- a/lucene/src/java/org/apache/lucene/search/spans/NearSpansUnordered.java +++ b/lucene/src/java/org/apache/lucene/search/spans/NearSpansUnordered.java @@ -18,7 +18,7 @@ package org.apache.lucene.search.spans; */ import org.apache.lucene.index.Term; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.util.Bits; import org.apache.lucene.util.PriorityQueue; import org.apache.lucene.util.TermContext; diff --git a/lucene/src/java/org/apache/lucene/search/spans/SpanMultiTermQueryWrapper.java b/lucene/src/java/org/apache/lucene/search/spans/SpanMultiTermQueryWrapper.java index 2a337b8318b..6fde8fb0f4a 100644 --- a/lucene/src/java/org/apache/lucene/search/spans/SpanMultiTermQueryWrapper.java +++ b/lucene/src/java/org/apache/lucene/search/spans/SpanMultiTermQueryWrapper.java @@ -21,7 +21,7 @@ import java.io.IOException; import java.util.Map; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Term; import org.apache.lucene.search.MultiTermQuery; import org.apache.lucene.search.Query; diff --git a/lucene/src/java/org/apache/lucene/search/spans/SpanNearQuery.java b/lucene/src/java/org/apache/lucene/search/spans/SpanNearQuery.java index f1d18211fe3..47bb0a1f367 100644 --- a/lucene/src/java/org/apache/lucene/search/spans/SpanNearQuery.java +++ b/lucene/src/java/org/apache/lucene/search/spans/SpanNearQuery.java @@ -28,7 +28,7 @@ import java.util.Set; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Term; import org.apache.lucene.search.Query; import org.apache.lucene.util.Bits; diff --git a/lucene/src/java/org/apache/lucene/search/spans/SpanNotQuery.java b/lucene/src/java/org/apache/lucene/search/spans/SpanNotQuery.java index bd4baf02cb8..d7fcfd68d0d 100644 --- a/lucene/src/java/org/apache/lucene/search/spans/SpanNotQuery.java +++ b/lucene/src/java/org/apache/lucene/search/spans/SpanNotQuery.java @@ -18,7 +18,7 @@ package org.apache.lucene.search.spans; */ import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Term; import org.apache.lucene.search.Query; import org.apache.lucene.util.Bits; diff --git a/lucene/src/java/org/apache/lucene/search/spans/SpanOrQuery.java b/lucene/src/java/org/apache/lucene/search/spans/SpanOrQuery.java index 0f151def8b8..560919d5c75 100644 --- a/lucene/src/java/org/apache/lucene/search/spans/SpanOrQuery.java +++ b/lucene/src/java/org/apache/lucene/search/spans/SpanOrQuery.java @@ -27,7 +27,7 @@ import java.util.Map; import java.util.Set; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Term; import org.apache.lucene.util.Bits; import org.apache.lucene.util.PriorityQueue; diff --git a/lucene/src/java/org/apache/lucene/search/spans/SpanPositionCheckQuery.java b/lucene/src/java/org/apache/lucene/search/spans/SpanPositionCheckQuery.java index c8f69c90b9f..5460dae83ee 100644 --- a/lucene/src/java/org/apache/lucene/search/spans/SpanPositionCheckQuery.java +++ b/lucene/src/java/org/apache/lucene/search/spans/SpanPositionCheckQuery.java @@ -18,7 +18,7 @@ package org.apache.lucene.search.spans; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Term; import org.apache.lucene.search.Query; import org.apache.lucene.util.Bits; diff --git a/lucene/src/java/org/apache/lucene/search/spans/SpanQuery.java b/lucene/src/java/org/apache/lucene/search/spans/SpanQuery.java index 4edded8ab67..cae5679e6aa 100644 --- a/lucene/src/java/org/apache/lucene/search/spans/SpanQuery.java +++ b/lucene/src/java/org/apache/lucene/search/spans/SpanQuery.java @@ -20,7 +20,7 @@ package org.apache.lucene.search.spans; import java.io.IOException; import java.util.Map; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Term; import org.apache.lucene.search.Query; import org.apache.lucene.search.IndexSearcher; diff --git a/lucene/src/java/org/apache/lucene/search/spans/SpanTermQuery.java b/lucene/src/java/org/apache/lucene/search/spans/SpanTermQuery.java index bbec6bab0a7..8f826c1b624 100644 --- a/lucene/src/java/org/apache/lucene/search/spans/SpanTermQuery.java +++ b/lucene/src/java/org/apache/lucene/search/spans/SpanTermQuery.java @@ -17,7 +17,7 @@ package org.apache.lucene.search.spans; * limitations under the License. */ -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Fields; import org.apache.lucene.index.Term; import org.apache.lucene.index.DocsAndPositionsEnum; diff --git a/lucene/src/java/org/apache/lucene/search/spans/SpanWeight.java b/lucene/src/java/org/apache/lucene/search/spans/SpanWeight.java index 54918ce14bf..d575dfa1e43 100644 --- a/lucene/src/java/org/apache/lucene/search/spans/SpanWeight.java +++ b/lucene/src/java/org/apache/lucene/search/spans/SpanWeight.java @@ -17,7 +17,7 @@ package org.apache.lucene.search.spans; * limitations under the License. */ -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.ReaderContext; import org.apache.lucene.index.Term; import org.apache.lucene.search.*; diff --git a/lucene/src/java/org/apache/lucene/util/FieldCacheSanityChecker.java b/lucene/src/java/org/apache/lucene/util/FieldCacheSanityChecker.java index 564829b54bb..0fb869f6c7c 100644 --- a/lucene/src/java/org/apache/lucene/util/FieldCacheSanityChecker.java +++ b/lucene/src/java/org/apache/lucene/util/FieldCacheSanityChecker.java @@ -23,7 +23,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.apache.lucene.index.AtomicIndexReader; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.search.FieldCache; import org.apache.lucene.search.FieldCache.CacheEntry; diff --git a/lucene/src/java/org/apache/lucene/util/ReaderUtil.java b/lucene/src/java/org/apache/lucene/util/ReaderUtil.java index 55220dbebef..5ee509d4f24 100644 --- a/lucene/src/java/org/apache/lucene/util/ReaderUtil.java +++ b/lucene/src/java/org/apache/lucene/util/ReaderUtil.java @@ -23,10 +23,10 @@ import java.io.IOException; import org.apache.lucene.index.FieldInfo; import org.apache.lucene.index.FieldInfos; -import org.apache.lucene.index.CompositeIndexReader; -import org.apache.lucene.index.CompositeIndexReader.CompositeReaderContext; -import org.apache.lucene.index.AtomicIndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.CompositeReader; +import org.apache.lucene.index.CompositeReader.CompositeReaderContext; +import org.apache.lucene.index.AtomicReader; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexReader.ReaderContext; @@ -68,11 +68,11 @@ public final class ReaderUtil { * @param reader */ - public static void gatherSubReaders(final List allSubReaders, IndexReader reader) { + public static void gatherSubReaders(final List allSubReaders, IndexReader reader) { try { new Gather(reader) { @Override - protected void add(int base, AtomicIndexReader r) { + protected void add(int base, AtomicReader r) { allSubReaders.add(r); } }.run(); @@ -103,13 +103,13 @@ public final class ReaderUtil { } private int run(int base, IndexReader reader) throws IOException { - if (reader instanceof AtomicIndexReader) { + if (reader instanceof AtomicReader) { // atomic reader - add(base, (AtomicIndexReader) reader); + add(base, (AtomicReader) reader); base += reader.maxDoc(); } else { - assert reader instanceof CompositeIndexReader : "must be a composite reader"; - IndexReader[] subReaders = ((CompositeIndexReader) reader).getSequentialSubReaders(); + assert reader instanceof CompositeReader : "must be a composite reader"; + IndexReader[] subReaders = ((CompositeReader) reader).getSequentialSubReaders(); for (int i = 0; i < subReaders.length; i++) { base = run(base, subReaders[i]); } @@ -118,7 +118,7 @@ public final class ReaderUtil { return base; } - protected abstract void add(int base, AtomicIndexReader r) throws IOException; + protected abstract void add(int base, AtomicReader r) throws IOException; } public static ReaderContext buildReaderContext(IndexReader reader) { @@ -140,13 +140,13 @@ public final class ReaderUtil { } private ReaderContext build(CompositeReaderContext parent, IndexReader reader, int ord, int docBase) { - if (reader instanceof AtomicIndexReader) { - AtomicReaderContext atomic = new AtomicReaderContext(parent, (AtomicIndexReader) reader, ord, docBase, leafOrd, leafDocBase); + if (reader instanceof AtomicReader) { + AtomicReaderContext atomic = new AtomicReaderContext(parent, (AtomicReader) reader, ord, docBase, leafOrd, leafDocBase); leaves[leafOrd++] = atomic; leafDocBase += reader.maxDoc(); return atomic; } else { - CompositeIndexReader cr = (CompositeIndexReader) reader; + CompositeReader cr = (CompositeReader) reader; IndexReader[] sequentialSubReaders = cr.getSequentialSubReaders(); ReaderContext[] children = new ReaderContext[sequentialSubReaders.length]; final CompositeReaderContext newParent; @@ -170,7 +170,7 @@ public final class ReaderUtil { try { new Gather(reader) { @Override - protected void add(int base, AtomicIndexReader r) { + protected void add(int base, AtomicReader r) { numLeaves[0]++; } }.run(); diff --git a/lucene/src/java/org/apache/lucene/util/TermContext.java b/lucene/src/java/org/apache/lucene/util/TermContext.java index b4464e2b9a5..a867ad20841 100644 --- a/lucene/src/java/org/apache/lucene/util/TermContext.java +++ b/lucene/src/java/org/apache/lucene/util/TermContext.java @@ -21,7 +21,7 @@ import java.io.IOException; import java.util.Arrays; import org.apache.lucene.index.Fields; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.ReaderContext; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.Term; diff --git a/lucene/src/test-framework/java/org/apache/lucene/index/ThreadedIndexingAndSearchingTestCase.java b/lucene/src/test-framework/java/org/apache/lucene/index/ThreadedIndexingAndSearchingTestCase.java index 3b25d92a15d..cc9e0bc871b 100644 --- a/lucene/src/test-framework/java/org/apache/lucene/index/ThreadedIndexingAndSearchingTestCase.java +++ b/lucene/src/test-framework/java/org/apache/lucene/index/ThreadedIndexingAndSearchingTestCase.java @@ -455,7 +455,7 @@ public abstract class ThreadedIndexingAndSearchingTestCase extends LuceneTestCas conf.setMergedSegmentWarmer(new IndexWriter.IndexReaderWarmer() { @Override - public void warm(AtomicIndexReader reader) throws IOException { + public void warm(AtomicReader reader) throws IOException { if (VERBOSE) { System.out.println("TEST: now warm merged reader=" + reader); } diff --git a/lucene/src/test-framework/java/org/apache/lucene/search/AssertingIndexSearcher.java b/lucene/src/test-framework/java/org/apache/lucene/search/AssertingIndexSearcher.java index 02897081bc5..ac23bccf84f 100644 --- a/lucene/src/test-framework/java/org/apache/lucene/search/AssertingIndexSearcher.java +++ b/lucene/src/test-framework/java/org/apache/lucene/search/AssertingIndexSearcher.java @@ -22,7 +22,7 @@ import java.util.concurrent.ExecutorService; import java.io.IOException; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.ReaderContext; import org.apache.lucene.util.Bits; diff --git a/lucene/src/test-framework/java/org/apache/lucene/search/CheckHits.java b/lucene/src/test-framework/java/org/apache/lucene/search/CheckHits.java index 5352500d041..31aa3ab3204 100644 --- a/lucene/src/test-framework/java/org/apache/lucene/search/CheckHits.java +++ b/lucene/src/test-framework/java/org/apache/lucene/search/CheckHits.java @@ -26,7 +26,7 @@ import java.util.Random; import junit.framework.Assert; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.store.Directory; import org.apache.lucene.util.LuceneTestCase; diff --git a/lucene/src/test-framework/java/org/apache/lucene/search/QueryUtils.java b/lucene/src/test-framework/java/org/apache/lucene/search/QueryUtils.java index 085492723a0..346a9602e1e 100644 --- a/lucene/src/test-framework/java/org/apache/lucene/search/QueryUtils.java +++ b/lucene/src/test-framework/java/org/apache/lucene/search/QueryUtils.java @@ -24,10 +24,10 @@ import junit.framework.Assert; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.document.Document; -import org.apache.lucene.index.AtomicIndexReader; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.DirectoryReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; import org.apache.lucene.index.MultiReader; @@ -239,7 +239,7 @@ public class QueryUtils { // FUTURE: ensure scorer.doc()==-1 final float maxDiff = 1e-5f; - final AtomicIndexReader lastReader[] = {null}; + final AtomicReader lastReader[] = {null}; s.search(q, new Collector() { private Scorer sc; @@ -301,7 +301,7 @@ public class QueryUtils { // confirm that skipping beyond the last doc, on the // previous reader, hits NO_MORE_DOCS if (lastReader[0] != null) { - final AtomicIndexReader previousReader = lastReader[0]; + final AtomicReader previousReader = lastReader[0]; IndexSearcher indexSearcher = LuceneTestCase.newSearcher(previousReader); Weight w = indexSearcher.createNormalizedWeight(q); AtomicReaderContext ctx = (AtomicReaderContext)indexSearcher.getTopReaderContext(); @@ -327,7 +327,7 @@ public class QueryUtils { if (lastReader[0] != null) { // confirm that skipping beyond the last doc, on the // previous reader, hits NO_MORE_DOCS - final AtomicIndexReader previousReader = lastReader[0]; + final AtomicReader previousReader = lastReader[0]; IndexSearcher indexSearcher = LuceneTestCase.newSearcher(previousReader, false); Weight w = indexSearcher.createNormalizedWeight(q); AtomicReaderContext ctx = previousReader.getTopReaderContext(); @@ -345,7 +345,7 @@ public class QueryUtils { //System.out.println("checkFirstSkipTo: "+q); final float maxDiff = 1e-3f; final int lastDoc[] = {-1}; - final AtomicIndexReader lastReader[] = {null}; + final AtomicReader lastReader[] = {null}; final AtomicReaderContext[] context = ReaderUtil.leaves(s.getTopReaderContext()); s.search(q,new Collector() { private Scorer scorer; @@ -386,7 +386,7 @@ public class QueryUtils { // confirm that skipping beyond the last doc, on the // previous reader, hits NO_MORE_DOCS if (lastReader[0] != null) { - final AtomicIndexReader previousReader = lastReader[0]; + final AtomicReader previousReader = lastReader[0]; IndexSearcher indexSearcher = LuceneTestCase.newSearcher(previousReader); Weight w = indexSearcher.createNormalizedWeight(q); Scorer scorer = w.scorer((AtomicReaderContext)indexSearcher.getTopReaderContext(), true, false, previousReader.getLiveDocs()); @@ -410,7 +410,7 @@ public class QueryUtils { if (lastReader[0] != null) { // confirm that skipping beyond the last doc, on the // previous reader, hits NO_MORE_DOCS - final AtomicIndexReader previousReader = lastReader[0]; + final AtomicReader previousReader = lastReader[0]; IndexSearcher indexSearcher = LuceneTestCase.newSearcher(previousReader); Weight w = indexSearcher.createNormalizedWeight(q); Scorer scorer = w.scorer((AtomicReaderContext)indexSearcher.getTopReaderContext(), true, false, previousReader.getLiveDocs()); diff --git a/lucene/src/test/org/apache/lucene/codecs/lucene40/TestReuseDocsEnum.java b/lucene/src/test/org/apache/lucene/codecs/lucene40/TestReuseDocsEnum.java index d34c43a02f4..8d1c7740888 100644 --- a/lucene/src/test/org/apache/lucene/codecs/lucene40/TestReuseDocsEnum.java +++ b/lucene/src/test/org/apache/lucene/codecs/lucene40/TestReuseDocsEnum.java @@ -22,7 +22,7 @@ import java.util.Random; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.codecs.Codec; import org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat; -import org.apache.lucene.index.AtomicIndexReader; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.DocsEnum; import org.apache.lucene.index.IndexReader; @@ -53,7 +53,7 @@ public class TestReuseDocsEnum extends LuceneTestCase { DirectoryReader open = DirectoryReader.open(dir); new ReaderUtil.Gather(open) { @Override - protected void add(int base, AtomicIndexReader r) throws IOException { + protected void add(int base, AtomicReader r) throws IOException { Terms terms = r.terms("body"); TermsEnum iterator = terms.iterator(null); IdentityHashMap enums = new IdentityHashMap(); @@ -82,7 +82,7 @@ public class TestReuseDocsEnum extends LuceneTestCase { DirectoryReader open = DirectoryReader.open(dir); IndexReader[] sequentialSubReaders = open.getSequentialSubReaders(); for (IndexReader indexReader : sequentialSubReaders) { - Terms terms = ((AtomicIndexReader) indexReader).terms("body"); + Terms terms = ((AtomicReader) indexReader).terms("body"); TermsEnum iterator = terms.iterator(null); IdentityHashMap enums = new IdentityHashMap(); MatchNoBits bits = new Bits.MatchNoBits(open.maxDoc()); @@ -130,7 +130,7 @@ public class TestReuseDocsEnum extends LuceneTestCase { IndexReader[] sequentialSubReaders2 = secondReader.getSequentialSubReaders(); for (IndexReader indexReader : sequentialSubReaders) { - Terms terms = ((AtomicIndexReader) indexReader).terms("body"); + Terms terms = ((AtomicReader) indexReader).terms("body"); TermsEnum iterator = terms.iterator(null); IdentityHashMap enums = new IdentityHashMap(); MatchNoBits bits = new Bits.MatchNoBits(firstReader.maxDoc()); @@ -159,7 +159,7 @@ public class TestReuseDocsEnum extends LuceneTestCase { if (random.nextInt(10) == 0) { return null; } - AtomicIndexReader indexReader = (AtomicIndexReader) readers[random.nextInt(readers.length)]; + AtomicReader indexReader = (AtomicReader) readers[random.nextInt(readers.length)]; return indexReader.termDocsEnum(bits, field, term, random.nextBoolean()); } diff --git a/lucene/src/test/org/apache/lucene/codecs/pulsing/TestPulsingReuse.java b/lucene/src/test/org/apache/lucene/codecs/pulsing/TestPulsingReuse.java index 6717ad831c9..f47667f1c38 100644 --- a/lucene/src/test/org/apache/lucene/codecs/pulsing/TestPulsingReuse.java +++ b/lucene/src/test/org/apache/lucene/codecs/pulsing/TestPulsingReuse.java @@ -26,7 +26,7 @@ import org.apache.lucene.codecs.nestedpulsing.NestedPulsingPostingsFormat; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.document.TextField; -import org.apache.lucene.index.AtomicIndexReader; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.CheckIndex; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.DocsAndPositionsEnum; @@ -56,7 +56,7 @@ public class TestPulsingReuse extends LuceneTestCase { DirectoryReader ir = iw.getReader(); iw.close(); - AtomicIndexReader segment = getOnlySegmentReader(ir); + AtomicReader segment = getOnlySegmentReader(ir); DocsEnum reuse = null; Map allEnums = new IdentityHashMap(); TermsEnum te = segment.terms("foo").iterator(null); @@ -98,7 +98,7 @@ public class TestPulsingReuse extends LuceneTestCase { DirectoryReader ir = iw.getReader(); iw.close(); - AtomicIndexReader segment = getOnlySegmentReader(ir); + AtomicReader segment = getOnlySegmentReader(ir); DocsEnum reuse = null; Map allEnums = new IdentityHashMap(); TermsEnum te = segment.terms("foo").iterator(null); diff --git a/lucene/src/test/org/apache/lucene/index/TestAddIndexes.java b/lucene/src/test/org/apache/lucene/index/TestAddIndexes.java index 46db64729d4..c6bb4a08b48 100755 --- a/lucene/src/test/org/apache/lucene/index/TestAddIndexes.java +++ b/lucene/src/test/org/apache/lucene/index/TestAddIndexes.java @@ -1288,7 +1288,7 @@ public class TestAddIndexes extends LuceneTestCase { w.forceMerge(1); DirectoryReader r3 = w.getReader(); w.close(); - AtomicIndexReader sr = getOnlySegmentReader(r3); + AtomicReader sr = getOnlySegmentReader(r3); assertEquals(2, sr.numDocs()); DocValues docValues = sr.docValues("dv"); assertNotNull(docValues); diff --git a/lucene/src/test/org/apache/lucene/index/TestCustomNorms.java b/lucene/src/test/org/apache/lucene/index/TestCustomNorms.java index 53ad3e57df3..c407d3fa5e9 100644 --- a/lucene/src/test/org/apache/lucene/index/TestCustomNorms.java +++ b/lucene/src/test/org/apache/lucene/index/TestCustomNorms.java @@ -79,7 +79,7 @@ public class TestCustomNorms extends LuceneTestCase { } writer.commit(); writer.close(); - AtomicIndexReader open = SlowCompositeReaderWrapper.wrap(DirectoryReader.open(dir)); + AtomicReader open = SlowCompositeReaderWrapper.wrap(DirectoryReader.open(dir)); DocValues normValues = open.normValues(floatTestField); assertNotNull(normValues); Source source = normValues.getSource(); diff --git a/lucene/src/test/org/apache/lucene/index/TestDocTermOrds.java b/lucene/src/test/org/apache/lucene/index/TestDocTermOrds.java index a7efe24e587..1caa3bd0c60 100644 --- a/lucene/src/test/org/apache/lucene/index/TestDocTermOrds.java +++ b/lucene/src/test/org/apache/lucene/index/TestDocTermOrds.java @@ -160,7 +160,7 @@ public class TestDocTermOrds extends LuceneTestCase { if (VERBOSE) { System.out.println("\nTEST: sub=" + subR); } - verify((AtomicIndexReader) subR, idToOrds, termsArray, null); + verify((AtomicReader) subR, idToOrds, termsArray, null); } // Also test top-level reader: its enum does not support @@ -168,7 +168,7 @@ public class TestDocTermOrds extends LuceneTestCase { if (VERBOSE) { System.out.println("TEST: top reader"); } - AtomicIndexReader slowR = SlowCompositeReaderWrapper.wrap(r); + AtomicReader slowR = SlowCompositeReaderWrapper.wrap(r); verify(slowR, idToOrds, termsArray, null); FieldCache.DEFAULT.purge(slowR); @@ -253,7 +253,7 @@ public class TestDocTermOrds extends LuceneTestCase { System.out.println("TEST: reader=" + r); } - AtomicIndexReader slowR = SlowCompositeReaderWrapper.wrap(r); + AtomicReader slowR = SlowCompositeReaderWrapper.wrap(r); for(String prefix : prefixesArray) { final BytesRef prefixRef = prefix == null ? null : new BytesRef(prefix); @@ -279,7 +279,7 @@ public class TestDocTermOrds extends LuceneTestCase { if (VERBOSE) { System.out.println("\nTEST: sub=" + subR); } - verify((AtomicIndexReader) subR, idToOrdsPrefix, termsArray, prefixRef); + verify((AtomicReader) subR, idToOrdsPrefix, termsArray, prefixRef); } // Also test top-level reader: its enum does not support @@ -296,7 +296,7 @@ public class TestDocTermOrds extends LuceneTestCase { dir.close(); } - private void verify(AtomicIndexReader r, int[][] idToOrds, BytesRef[] termsArray, BytesRef prefixRef) throws Exception { + private void verify(AtomicReader r, int[][] idToOrds, BytesRef[] termsArray, BytesRef prefixRef) throws Exception { final DocTermOrds dto = new DocTermOrds(r, "field", diff --git a/lucene/src/test/org/apache/lucene/index/TestDocValuesIndexing.java b/lucene/src/test/org/apache/lucene/index/TestDocValuesIndexing.java index 53855e7a0e2..f58d4c8cdc9 100644 --- a/lucene/src/test/org/apache/lucene/index/TestDocValuesIndexing.java +++ b/lucene/src/test/org/apache/lucene/index/TestDocValuesIndexing.java @@ -696,7 +696,7 @@ public class TestDocValuesIndexing extends LuceneTestCase { w.forceMerge(1); DirectoryReader r = w.getReader(); w.close(); - assertEquals(17, ((AtomicIndexReader) r.getSequentialSubReaders()[0]).docValues("field").load().getInt(0)); + assertEquals(17, ((AtomicReader) r.getSequentialSubReaders()[0]).docValues("field").load().getInt(0)); r.close(); d.close(); } @@ -795,7 +795,7 @@ public class TestDocValuesIndexing extends LuceneTestCase { int ord = asSortedSource.getByValue(expected, actual); assertEquals(i, ord); } - AtomicIndexReader slowR = SlowCompositeReaderWrapper.wrap(reader); + AtomicReader slowR = SlowCompositeReaderWrapper.wrap(reader); Set> entrySet = docToString.entrySet(); for (Entry entry : entrySet) { @@ -810,7 +810,7 @@ public class TestDocValuesIndexing extends LuceneTestCase { } } - public int docId(AtomicIndexReader reader, Term term) throws IOException { + public int docId(AtomicReader reader, Term term) throws IOException { int docFreq = reader.docFreq(term); assertEquals(1, docFreq); DocsEnum termDocsEnum = reader.termDocsEnum(null, term.field, term.bytes, false); diff --git a/lucene/src/test/org/apache/lucene/index/TestDocsAndPositions.java b/lucene/src/test/org/apache/lucene/index/TestDocsAndPositions.java index fd214012cbe..bf5cc80a841 100644 --- a/lucene/src/test/org/apache/lucene/index/TestDocsAndPositions.java +++ b/lucene/src/test/org/apache/lucene/index/TestDocsAndPositions.java @@ -25,7 +25,7 @@ import org.apache.lucene.document.Document; import org.apache.lucene.document.FieldType; import org.apache.lucene.document.StringField; import org.apache.lucene.document.TextField; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.ReaderContext; import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.store.Directory; @@ -94,7 +94,7 @@ public class TestDocsAndPositions extends LuceneTestCase { directory.close(); } - public DocsAndPositionsEnum getDocsAndPositions(AtomicIndexReader reader, + public DocsAndPositionsEnum getDocsAndPositions(AtomicReader reader, BytesRef bytes, Bits liveDocs) throws IOException { return reader.termPositionsEnum(null, fieldName, bytes, false); } @@ -332,7 +332,7 @@ public class TestDocsAndPositions extends LuceneTestCase { doc.add(newField("foo", "bar", StringField.TYPE_UNSTORED)); writer.addDocument(doc); DirectoryReader reader = writer.getReader(); - AtomicIndexReader r = getOnlySegmentReader(reader); + AtomicReader r = getOnlySegmentReader(reader); DocsEnum disi = _TestUtil.docs(random, r, "foo", new BytesRef("bar"), null, null, false); int docid = disi.docID(); assertTrue(docid == -1 || docid == DocIdSetIterator.NO_MORE_DOCS); @@ -357,7 +357,7 @@ public class TestDocsAndPositions extends LuceneTestCase { doc.add(newField("foo", "bar", TextField.TYPE_UNSTORED)); writer.addDocument(doc); DirectoryReader reader = writer.getReader(); - AtomicIndexReader r = getOnlySegmentReader(reader); + AtomicReader r = getOnlySegmentReader(reader); DocsAndPositionsEnum disi = r.termPositionsEnum(null, "foo", new BytesRef("bar"), false); int docid = disi.docID(); assertTrue(docid == -1 || docid == DocIdSetIterator.NO_MORE_DOCS); diff --git a/lucene/src/test/org/apache/lucene/index/TestFieldsReader.java b/lucene/src/test/org/apache/lucene/index/TestFieldsReader.java index 6b026585698..803235254c5 100644 --- a/lucene/src/test/org/apache/lucene/index/TestFieldsReader.java +++ b/lucene/src/test/org/apache/lucene/index/TestFieldsReader.java @@ -278,7 +278,7 @@ public class TestFieldsReader extends LuceneTestCase { assertEquals(numDocs, r.numDocs()); for(IndexReader sub : r.getSequentialSubReaders()) { - final int[] ids = FieldCache.DEFAULT.getInts((AtomicIndexReader) sub, "id", false); + final int[] ids = FieldCache.DEFAULT.getInts((AtomicReader) sub, "id", false); for(int docID=0;docID subReaders = new ArrayList(); + List subReaders = new ArrayList(); ReaderUtil.gatherSubReaders(subReaders, s.getIndexReader()); subSearchers = new ShardSearcher[subReaders.size()]; final IndexReader.ReaderContext ctx = s.getTopReaderContext(); @@ -634,7 +634,7 @@ public class TestGrouping extends LuceneTestCase { assert subSearchers.length == 1; subSearchers[0] = new ShardSearcher((AtomicReaderContext) ctx, ctx); } else { - final CompositeIndexReader.CompositeReaderContext compCTX = (CompositeIndexReader.CompositeReaderContext) ctx; + final CompositeReader.CompositeReaderContext compCTX = (CompositeReader.CompositeReaderContext) ctx; for(int searcherIDX=0;searcherIDX { @Override public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException { FixedBitSet res = null; - final AtomicIndexReader reader = context.reader(); + final AtomicReader reader = context.reader(); boolean hasShouldClauses = false; for (final FilterClause fc : clauses) { diff --git a/modules/queries/src/java/org/apache/lucene/queries/ChainedFilter.java b/modules/queries/src/java/org/apache/lucene/queries/ChainedFilter.java index 2280c7860e3..c594a751b40 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/ChainedFilter.java +++ b/modules/queries/src/java/org/apache/lucene/queries/ChainedFilter.java @@ -17,8 +17,8 @@ package org.apache.lucene.queries; * limitations under the License. */ -import org.apache.lucene.index.AtomicIndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.BitsFilteredDocIdSet; import org.apache.lucene.search.DocIdSet; import org.apache.lucene.search.DocIdSetIterator; @@ -129,7 +129,7 @@ public class ChainedFilter extends Filter { private OpenBitSetDISI initialResult(AtomicReaderContext context, int logic, int[] index) throws IOException { - AtomicIndexReader reader = context.reader(); + AtomicReader reader = context.reader(); OpenBitSetDISI result; /** * First AND operation takes place against a completely false diff --git a/modules/queries/src/java/org/apache/lucene/queries/CustomScoreProvider.java b/modules/queries/src/java/org/apache/lucene/queries/CustomScoreProvider.java index da34964ea84..bfa524fa73c 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/CustomScoreProvider.java +++ b/modules/queries/src/java/org/apache/lucene/queries/CustomScoreProvider.java @@ -19,7 +19,7 @@ package org.apache.lucene.queries; import java.io.IOException; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader; // for javadocs import org.apache.lucene.search.Explanation; import org.apache.lucene.search.FieldCache; // for javadocs diff --git a/modules/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java b/modules/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java index cd50df02bfd..d5046c4fdac 100755 --- a/modules/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java +++ b/modules/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java @@ -22,7 +22,7 @@ import java.util.Set; import java.util.Arrays; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Term; import org.apache.lucene.search.ComplexExplanation; import org.apache.lucene.search.Explanation; diff --git a/modules/queries/src/java/org/apache/lucene/queries/TermsFilter.java b/modules/queries/src/java/org/apache/lucene/queries/TermsFilter.java index 7235f094046..518fa75d177 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/TermsFilter.java +++ b/modules/queries/src/java/org/apache/lucene/queries/TermsFilter.java @@ -18,7 +18,7 @@ package org.apache.lucene.queries; */ import org.apache.lucene.index.*; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.DocIdSet; import org.apache.lucene.search.Filter; import org.apache.lucene.util.Bits; @@ -55,7 +55,7 @@ public class TermsFilter extends Filter { @Override public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException { - AtomicIndexReader reader = context.reader(); + AtomicReader reader = context.reader(); FixedBitSet result = new FixedBitSet(reader.maxDoc()); Fields fields = reader.fields(); diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/BoostedQuery.java b/modules/queries/src/java/org/apache/lucene/queries/function/BoostedQuery.java index 15b0d5bbd54..20a04d75bfb 100755 --- a/modules/queries/src/java/org/apache/lucene/queries/function/BoostedQuery.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/BoostedQuery.java @@ -19,7 +19,7 @@ package org.apache.lucene.queries.function; import org.apache.lucene.search.*; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.util.Bits; import org.apache.lucene.util.ToStringUtils; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/FunctionQuery.java b/modules/queries/src/java/org/apache/lucene/queries/function/FunctionQuery.java index b6be540835e..fcdb518b78d 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/FunctionQuery.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/FunctionQuery.java @@ -18,7 +18,7 @@ package org.apache.lucene.queries.function; */ import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.*; import org.apache.lucene.index.MultiFields; import org.apache.lucene.util.Bits; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/ValueSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/ValueSource.java index fc509bfe9fc..b49da0a0b37 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/ValueSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/ValueSource.java @@ -18,7 +18,7 @@ package org.apache.lucene.queries.function; */ import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.FieldComparator; import org.apache.lucene.search.FieldComparatorSource; import org.apache.lucene.search.Scorer; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/docvalues/StringIndexDocValues.java b/modules/queries/src/java/org/apache/lucene/queries/function/docvalues/StringIndexDocValues.java index c845f1811e4..c8e42e9fd0e 100755 --- a/modules/queries/src/java/org/apache/lucene/queries/function/docvalues/StringIndexDocValues.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/docvalues/StringIndexDocValues.java @@ -22,7 +22,7 @@ import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSourceScorer; import org.apache.lucene.search.FieldCache; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.CharsRef; import org.apache.lucene.util.UnicodeUtil; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ByteFieldSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ByteFieldSource.java index 0e7359d6ced..031742dfba9 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ByteFieldSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ByteFieldSource.java @@ -19,7 +19,7 @@ package org.apache.lucene.queries.function.valuesource; import java.io.IOException; import java.util.Map; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.search.FieldCache; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/BytesRefFieldSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/BytesRefFieldSource.java index 2505769e0cf..4b1e4753a96 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/BytesRefFieldSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/BytesRefFieldSource.java @@ -17,7 +17,7 @@ package org.apache.lucene.queries.function.valuesource; * limitations under the License. */ -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.docvalues.StringIndexDocValues; import org.apache.lucene.queries.function.ValueSource; //javadoc diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ConstValueSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ConstValueSource.java index b37cc46ff48..0fde798871d 100755 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ConstValueSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ConstValueSource.java @@ -17,7 +17,7 @@ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.docvalues.FloatDocValues; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DefFunction.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DefFunction.java index d83a53613a1..381e2c7a37f 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DefFunction.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DefFunction.java @@ -16,7 +16,7 @@ package org.apache.lucene.queries.function.valuesource; * limitations under the License. */ -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.search.IndexSearcher; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DocFreqValueSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DocFreqValueSource.java index 4eaae1dece7..74011054b90 100755 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DocFreqValueSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DocFreqValueSource.java @@ -17,7 +17,7 @@ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Term; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DoubleConstValueSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DoubleConstValueSource.java index 7d475365d63..688de3f01f7 100755 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DoubleConstValueSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DoubleConstValueSource.java @@ -17,7 +17,7 @@ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.docvalues.DoubleDocValues; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DoubleFieldSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DoubleFieldSource.java index 263cbf5fdfd..96309b42899 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DoubleFieldSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DoubleFieldSource.java @@ -20,7 +20,7 @@ package org.apache.lucene.queries.function.valuesource; import java.io.IOException; import java.util.Map; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSourceScorer; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DualFloatFunction.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DualFloatFunction.java index b67b07d22f9..5734b9fb6f0 100755 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DualFloatFunction.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/DualFloatFunction.java @@ -17,7 +17,7 @@ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.FloatDocValues; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/FloatFieldSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/FloatFieldSource.java index d1bbf7b63d1..2dfe88bfd9e 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/FloatFieldSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/FloatFieldSource.java @@ -20,7 +20,7 @@ package org.apache.lucene.queries.function.valuesource; import java.io.IOException; import java.util.Map; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.docvalues.FloatDocValues; import org.apache.lucene.search.FieldCache; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/IDFValueSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/IDFValueSource.java index 65876db72aa..51ae740a829 100755 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/IDFValueSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/IDFValueSource.java @@ -18,7 +18,7 @@ package org.apache.lucene.queries.function.valuesource; import org.apache.lucene.index.*; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.similarities.Similarity; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/IfFunction.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/IfFunction.java index 05e6988c1c0..e5fdffe545d 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/IfFunction.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/IfFunction.java @@ -18,7 +18,7 @@ package org.apache.lucene.queries.function.valuesource; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.search.Explanation; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/IntFieldSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/IntFieldSource.java index 74c3d6dc86a..90e065f0e4b 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/IntFieldSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/IntFieldSource.java @@ -20,7 +20,7 @@ package org.apache.lucene.queries.function.valuesource; import java.io.IOException; import java.util.Map; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSourceScorer; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/JoinDocFreqValueSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/JoinDocFreqValueSource.java index 63cbfda9c01..99cef2c593b 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/JoinDocFreqValueSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/JoinDocFreqValueSource.java @@ -21,7 +21,7 @@ import java.io.IOException; import java.util.Map; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.docvalues.IntDocValues; import org.apache.lucene.search.FieldCache.DocTerms; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/LinearFloatFunction.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/LinearFloatFunction.java index c385b6f989b..cbb2392672b 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/LinearFloatFunction.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/LinearFloatFunction.java @@ -17,7 +17,7 @@ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.FloatDocValues; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/LiteralValueSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/LiteralValueSource.java index 84c88f6c4e6..1d4e3d7cfbf 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/LiteralValueSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/LiteralValueSource.java @@ -16,7 +16,7 @@ package org.apache.lucene.queries.function.valuesource; * limitations under the License. */ -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.StrDocValues; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/LongFieldSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/LongFieldSource.java index 6e8e9530f34..1caeab8f1c4 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/LongFieldSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/LongFieldSource.java @@ -20,7 +20,7 @@ package org.apache.lucene.queries.function.valuesource; import java.io.IOException; import java.util.Map; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSourceScorer; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/MaxDocValueSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/MaxDocValueSource.java index 30dbcbad520..a74b056e149 100755 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/MaxDocValueSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/MaxDocValueSource.java @@ -16,7 +16,7 @@ */ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.search.IndexSearcher; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/MultiBoolFunction.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/MultiBoolFunction.java index b0b6995787b..df1b023a4d8 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/MultiBoolFunction.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/MultiBoolFunction.java @@ -17,7 +17,7 @@ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.BoolDocValues; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/MultiFloatFunction.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/MultiFloatFunction.java index fb539c4b443..bc6019b3ef8 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/MultiFloatFunction.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/MultiFloatFunction.java @@ -16,7 +16,7 @@ package org.apache.lucene.queries.function.valuesource; * limitations under the License. */ -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.FloatDocValues; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/MultiFunction.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/MultiFunction.java index 4549535302e..1a6ebc9620a 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/MultiFunction.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/MultiFunction.java @@ -16,7 +16,7 @@ package org.apache.lucene.queries.function.valuesource; * limitations under the License. */ -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.search.IndexSearcher; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/NormValueSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/NormValueSource.java index c56b9ba84ce..2019535d637 100755 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/NormValueSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/NormValueSource.java @@ -18,7 +18,7 @@ package org.apache.lucene.queries.function.valuesource; import org.apache.lucene.index.DocValues; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.FloatDocValues; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/NumDocsValueSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/NumDocsValueSource.java index 8bea43bfad4..608f2162d80 100755 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/NumDocsValueSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/NumDocsValueSource.java @@ -16,7 +16,7 @@ */ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.util.ReaderUtil; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/NumericIndexDocValueSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/NumericIndexDocValueSource.java index 9dbc4d3420d..9836f5ff49a 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/NumericIndexDocValueSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/NumericIndexDocValueSource.java @@ -21,7 +21,7 @@ import java.util.Map; import org.apache.lucene.index.DocValues.Source; import org.apache.lucene.index.DocValues.Type; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/OrdFieldSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/OrdFieldSource.java index 00ca19df6ea..3c9770525dd 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/OrdFieldSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/OrdFieldSource.java @@ -17,10 +17,10 @@ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader; -import org.apache.lucene.index.CompositeIndexReader; +import org.apache.lucene.index.AtomicReader; +import org.apache.lucene.index.CompositeReader; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; @@ -69,9 +69,9 @@ public class OrdFieldSource extends ValueSource { public FunctionValues getValues(Map context, AtomicReaderContext readerContext) throws IOException { final int off = readerContext.docBase; final IndexReader topReader = ReaderUtil.getTopLevelContext(readerContext).reader(); - final AtomicIndexReader r = topReader instanceof CompositeIndexReader - ? new SlowCompositeReaderWrapper((CompositeIndexReader)topReader) - : (AtomicIndexReader) topReader; + final AtomicReader r = topReader instanceof CompositeReader + ? new SlowCompositeReaderWrapper((CompositeReader)topReader) + : (AtomicReader) topReader; final FieldCache.DocTermsIndex sindex = FieldCache.DEFAULT.getTermsIndex(r, field); return new IntDocValues(this) { protected String toTerm(String readableValue) { diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/QueryValueSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/QueryValueSource.java index 11ccc882d40..a748c70c965 100755 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/QueryValueSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/QueryValueSource.java @@ -17,7 +17,7 @@ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.FloatDocValues; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/RangeMapFloatFunction.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/RangeMapFloatFunction.java index 1d45faf9119..88b4b022739 100755 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/RangeMapFloatFunction.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/RangeMapFloatFunction.java @@ -17,7 +17,7 @@ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.FloatDocValues; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ReciprocalFloatFunction.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ReciprocalFloatFunction.java index 729d2515d2a..84b24c78c60 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ReciprocalFloatFunction.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ReciprocalFloatFunction.java @@ -17,7 +17,7 @@ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.FloatDocValues; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ReverseOrdFieldSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ReverseOrdFieldSource.java index 6ddf03fb5f2..dc58c3cd0b7 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ReverseOrdFieldSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ReverseOrdFieldSource.java @@ -17,10 +17,10 @@ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader; -import org.apache.lucene.index.CompositeIndexReader; +import org.apache.lucene.index.AtomicReader; +import org.apache.lucene.index.CompositeReader; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; @@ -68,9 +68,9 @@ public class ReverseOrdFieldSource extends ValueSource { @Override public FunctionValues getValues(Map context, AtomicReaderContext readerContext) throws IOException { final IndexReader topReader = ReaderUtil.getTopLevelContext(readerContext).reader(); - final AtomicIndexReader r = topReader instanceof CompositeIndexReader - ? new SlowCompositeReaderWrapper((CompositeIndexReader)topReader) - : (AtomicIndexReader) topReader; + final AtomicReader r = topReader instanceof CompositeReader + ? new SlowCompositeReaderWrapper((CompositeReader)topReader) + : (AtomicReader) topReader; final int off = readerContext.docBase; final FieldCache.DocTermsIndex sindex = FieldCache.DEFAULT.getTermsIndex(r, field); diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java index c62c17772ee..c72d85144d0 100755 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java @@ -17,7 +17,7 @@ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.FloatDocValues; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ShortFieldSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ShortFieldSource.java index d43ca23a6ac..cccb1554978 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ShortFieldSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/ShortFieldSource.java @@ -19,7 +19,7 @@ package org.apache.lucene.queries.function.valuesource; import java.io.IOException; import java.util.Map; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.search.FieldCache; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/SimpleBoolFunction.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/SimpleBoolFunction.java index ca27da6e0a2..2d45a2954b8 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/SimpleBoolFunction.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/SimpleBoolFunction.java @@ -17,7 +17,7 @@ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.BoolDocValues; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/SimpleFloatFunction.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/SimpleFloatFunction.java index cd0af13e6e0..e63d4c37d63 100755 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/SimpleFloatFunction.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/SimpleFloatFunction.java @@ -17,7 +17,7 @@ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.FloatDocValues; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/SumTotalTermFreqValueSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/SumTotalTermFreqValueSource.java index e25eebff5c4..0f2b1abe6f2 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/SumTotalTermFreqValueSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/SumTotalTermFreqValueSource.java @@ -17,7 +17,7 @@ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.Fields; import org.apache.lucene.index.Terms; import org.apache.lucene.queries.function.FunctionValues; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TFValueSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TFValueSource.java index 6c4dff4a22d..f5484013fe9 100755 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TFValueSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TFValueSource.java @@ -18,7 +18,7 @@ package org.apache.lucene.queries.function.valuesource; */ import org.apache.lucene.index.*; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.docvalues.FloatDocValues; import org.apache.lucene.search.DocIdSetIterator; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TermFreqValueSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TermFreqValueSource.java index 00ae2147a90..366b2895361 100755 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TermFreqValueSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TermFreqValueSource.java @@ -18,7 +18,7 @@ package org.apache.lucene.queries.function.valuesource; import org.apache.lucene.index.*; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.docvalues.IntDocValues; import org.apache.lucene.search.DocIdSetIterator; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TotalTermFreqValueSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TotalTermFreqValueSource.java index 1dc13c6f3c6..12f51e6eeee 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TotalTermFreqValueSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TotalTermFreqValueSource.java @@ -17,7 +17,7 @@ package org.apache.lucene.queries.function.valuesource; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.LongDocValues; diff --git a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/VectorValueSource.java b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/VectorValueSource.java index 3bbb4e448e2..06eff6d038f 100644 --- a/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/VectorValueSource.java +++ b/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/VectorValueSource.java @@ -16,7 +16,7 @@ package org.apache.lucene.queries.function.valuesource; * limitations under the License. */ -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.search.IndexSearcher; diff --git a/modules/queries/src/test/org/apache/lucene/queries/BooleanFilterTest.java b/modules/queries/src/test/org/apache/lucene/queries/BooleanFilterTest.java index b93da80e52c..8e36ab3d766 100644 --- a/modules/queries/src/test/org/apache/lucene/queries/BooleanFilterTest.java +++ b/modules/queries/src/test/org/apache/lucene/queries/BooleanFilterTest.java @@ -21,8 +21,8 @@ import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.analysis.MockTokenizer; import org.apache.lucene.document.Document; import org.apache.lucene.document.TextField; -import org.apache.lucene.index.AtomicIndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.index.Term; @@ -42,7 +42,7 @@ import java.io.IOException; public class BooleanFilterTest extends LuceneTestCase { private Directory directory; - private AtomicIndexReader reader; + private AtomicReader reader; @Override public void setUp() throws Exception { diff --git a/modules/queries/src/test/org/apache/lucene/queries/TermsFilterTest.java b/modules/queries/src/test/org/apache/lucene/queries/TermsFilterTest.java index d50c4702890..a7344c40a7a 100644 --- a/modules/queries/src/test/org/apache/lucene/queries/TermsFilterTest.java +++ b/modules/queries/src/test/org/apache/lucene/queries/TermsFilterTest.java @@ -22,7 +22,7 @@ import java.util.HashSet; import org.apache.lucene.document.Document; import org.apache.lucene.document.StringField; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.MultiReader; import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.index.SlowCompositeReaderWrapper; diff --git a/modules/queries/src/test/org/apache/lucene/queries/TestCustomScoreQuery.java b/modules/queries/src/test/org/apache/lucene/queries/TestCustomScoreQuery.java index 75dbf522d58..eafebd4f249 100755 --- a/modules/queries/src/test/org/apache/lucene/queries/TestCustomScoreQuery.java +++ b/modules/queries/src/test/org/apache/lucene/queries/TestCustomScoreQuery.java @@ -28,7 +28,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.Term; diff --git a/modules/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/NumericRangeFilterBuilder.java b/modules/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/NumericRangeFilterBuilder.java index b286dd9ecad..be9bb8e3032 100644 --- a/modules/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/NumericRangeFilterBuilder.java +++ b/modules/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/NumericRangeFilterBuilder.java @@ -17,7 +17,7 @@ package org.apache.lucene.queryparser.xml.builders; * limitations under the License. */ -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.DocIdSet; import org.apache.lucene.search.Filter; import org.apache.lucene.search.NumericRangeFilter; diff --git a/modules/queryparser/src/test/org/apache/lucene/queryparser/surround/query/BooleanQueryTst.java b/modules/queryparser/src/test/org/apache/lucene/queryparser/surround/query/BooleanQueryTst.java index eb01da93fa5..82e4b25dd93 100644 --- a/modules/queryparser/src/test/org/apache/lucene/queryparser/surround/query/BooleanQueryTst.java +++ b/modules/queryparser/src/test/org/apache/lucene/queryparser/surround/query/BooleanQueryTst.java @@ -20,7 +20,7 @@ package org.apache.lucene.queryparser.surround.query; import java.io.IOException; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.Collector; import org.apache.lucene.search.Scorer; diff --git a/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/TestParser.java b/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/TestParser.java index 1590659e036..6d94e97494f 100644 --- a/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/TestParser.java +++ b/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/TestParser.java @@ -24,7 +24,7 @@ import org.apache.lucene.analysis.MockTokenizer; import org.apache.lucene.document.Document; import org.apache.lucene.document.NumericField; import org.apache.lucene.document.TextField; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.search.IndexSearcher; diff --git a/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/builders/TestNumericRangeFilterBuilder.java b/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/builders/TestNumericRangeFilterBuilder.java index d56d29df1e9..5201355c67f 100644 --- a/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/builders/TestNumericRangeFilterBuilder.java +++ b/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/builders/TestNumericRangeFilterBuilder.java @@ -17,9 +17,9 @@ package org.apache.lucene.queryparser.xml.builders; * limitations under the License. */ -import org.apache.lucene.index.AtomicIndexReader; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.AtomicIndexReader.AtomicReaderContext; +import org.apache.lucene.index.AtomicReader.AtomicReaderContext; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.search.Filter; @@ -64,7 +64,7 @@ public class TestNumericRangeFilterBuilder extends LuceneTestCase { IndexWriter writer = new IndexWriter(ramDir, newIndexWriterConfig(TEST_VERSION_CURRENT, null)); writer.commit(); try { - AtomicIndexReader reader = new SlowCompositeReaderWrapper(IndexReader.open(ramDir)); + AtomicReader reader = new SlowCompositeReaderWrapper(IndexReader.open(ramDir)); try { assertNull(filter.getDocIdSet((AtomicReaderContext) reader.getTopReaderContext(), reader.getLiveDocs())); } diff --git a/modules/suggest/src/java/org/apache/lucene/search/spell/SpellChecker.java b/modules/suggest/src/java/org/apache/lucene/search/spell/SpellChecker.java index b62c1245a49..1564a7200b1 100755 --- a/modules/suggest/src/java/org/apache/lucene/search/spell/SpellChecker.java +++ b/modules/suggest/src/java/org/apache/lucene/search/spell/SpellChecker.java @@ -28,7 +28,7 @@ import org.apache.lucene.document.Field; import org.apache.lucene.document.FieldType; import org.apache.lucene.index.FieldInfo.IndexOptions; import org.apache.lucene.document.StringField; -import org.apache.lucene.index.AtomicIndexReader; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; @@ -499,7 +499,7 @@ public class SpellChecker implements java.io.Closeable { if (reader.maxDoc() > 0) { new ReaderUtil.Gather(reader) { @Override - protected void add(int base, AtomicIndexReader r) throws IOException { + protected void add(int base, AtomicReader r) throws IOException { Terms terms = r.terms(F_WORD); if (terms != null) termsEnums.add(terms.iterator(null));