Index: lucene/CHANGES.txt =================================================================== --- lucene/CHANGES.txt (revision 1352563) +++ lucene/CHANGES.txt (working copy) @@ -283,6 +283,9 @@ removed, as IndexReaderContext.leaves() is now the preferred way to access sub-readers. (Uwe Schindler) +* LUCENE-4155: oal.util.ReaderUtil class was moved to oal.index package. + (Uwe Schindler) + Changes in Runtime Behavior * LUCENE-2846: omitNorms now behaves like omitTermFrequencyAndPositions, if you Index: lucene/core/src/java/org/apache/lucene/index/AtomicReader.java =================================================================== --- lucene/core/src/java/org/apache/lucene/index/AtomicReader.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/index/AtomicReader.java (working copy) @@ -22,7 +22,6 @@ import org.apache.lucene.search.SearcherManager; // javadocs import org.apache.lucene.util.Bits; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.ReaderUtil; // for javadocs /** {@code AtomicReader} is an abstract class, providing an interface for accessing an index. Search of an index is done entirely through this abstract interface, Index: lucene/core/src/java/org/apache/lucene/index/BaseCompositeReader.java =================================================================== --- lucene/core/src/java/org/apache/lucene/index/BaseCompositeReader.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/index/BaseCompositeReader.java (working copy) @@ -23,7 +23,6 @@ import java.util.List; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.ReaderUtil; /** Base class for implementing {@link CompositeReader}s based on an array * of sub-readers. The implementing class has to add code for Index: lucene/core/src/java/org/apache/lucene/index/BitsSlice.java =================================================================== --- lucene/core/src/java/org/apache/lucene/index/BitsSlice.java (revision 0) +++ lucene/core/src/java/org/apache/lucene/index/BitsSlice.java (working copy) @@ -0,0 +1,51 @@ +package org.apache.lucene.index; + +import org.apache.lucene.util.Bits; + +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Exposes a slice of an existing Bits as a new Bits. + * + * @lucene.internal + */ +final class BitsSlice implements Bits { + private final Bits parent; + private final int start; + private final int length; + + // start is inclusive; end is exclusive (length = end-start) + public BitsSlice(Bits parent, ReaderSlice slice) { + this.parent = parent; + this.start = slice.start; + this.length = slice.length; + assert length >= 0: "length=" + length; + } + + public boolean get(int doc) { + if (doc >= length) { + throw new RuntimeException("doc " + doc + " is out of bounds 0 .. " + (length-1)); + } + assert doc < length: "doc=" + doc + " length=" + length; + return parent.get(doc+start); + } + + public int length() { + return length; + } +} Index: lucene/core/src/java/org/apache/lucene/index/BitsSlice.java =================================================================== --- lucene/core/src/java/org/apache/lucene/index/BitsSlice.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/index/BitsSlice.java (working copy) Property changes on: lucene/core/src/java/org/apache/lucene/index/BitsSlice.java ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: lucene/core/src/java/org/apache/lucene/index/IndexReader.java =================================================================== --- lucene/core/src/java/org/apache/lucene/index/IndexReader.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/index/IndexReader.java (working copy) @@ -31,7 +31,6 @@ 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 /** IndexReader is an abstract class, providing an interface for accessing an index. Search of an index is done entirely through this abstract interface, Index: lucene/core/src/java/org/apache/lucene/index/MultiDocsAndPositionsEnum.java =================================================================== --- lucene/core/src/java/org/apache/lucene/index/MultiDocsAndPositionsEnum.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/index/MultiDocsAndPositionsEnum.java (working copy) @@ -18,7 +18,6 @@ */ import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.ReaderSlice; import java.io.IOException; Index: lucene/core/src/java/org/apache/lucene/index/MultiDocsEnum.java =================================================================== --- lucene/core/src/java/org/apache/lucene/index/MultiDocsEnum.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/index/MultiDocsEnum.java (working copy) @@ -17,7 +17,6 @@ * limitations under the License. */ -import org.apache.lucene.util.ReaderSlice; import java.io.IOException; import java.util.Arrays; Index: lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java =================================================================== --- lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java (working copy) @@ -28,7 +28,6 @@ import org.apache.lucene.util.ArrayUtil; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.PagedBytes; -import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util.packed.PackedInts.Reader; /** Index: lucene/core/src/java/org/apache/lucene/index/MultiFields.java =================================================================== --- lucene/core/src/java/org/apache/lucene/index/MultiFields.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/index/MultiFields.java (working copy) @@ -28,7 +28,6 @@ import org.apache.lucene.util.Bits; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.MultiBits; -import org.apache.lucene.util.ReaderSlice; /** * Exposes flex API, merged from flex API of sub-segments. Index: lucene/core/src/java/org/apache/lucene/index/MultiFieldsEnum.java =================================================================== --- lucene/core/src/java/org/apache/lucene/index/MultiFieldsEnum.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/index/MultiFieldsEnum.java (working copy) @@ -18,7 +18,6 @@ */ import org.apache.lucene.util.PriorityQueue; -import org.apache.lucene.util.ReaderSlice; import java.io.IOException; import java.util.List; Index: lucene/core/src/java/org/apache/lucene/index/MultiTerms.java =================================================================== --- lucene/core/src/java/org/apache/lucene/index/MultiTerms.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/index/MultiTerms.java (working copy) @@ -23,7 +23,6 @@ import java.util.List; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.ReaderSlice; import org.apache.lucene.util.automaton.CompiledAutomaton; Index: lucene/core/src/java/org/apache/lucene/index/MultiTermsEnum.java =================================================================== --- lucene/core/src/java/org/apache/lucene/index/MultiTermsEnum.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/index/MultiTermsEnum.java (working copy) @@ -20,9 +20,7 @@ import org.apache.lucene.util.PriorityQueue; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.Bits; -import org.apache.lucene.util.BitsSlice; import org.apache.lucene.util.MultiBits; -import org.apache.lucene.util.ReaderSlice; import java.io.IOException; import java.util.Arrays; Index: lucene/core/src/java/org/apache/lucene/index/ReaderSlice.java =================================================================== --- lucene/core/src/java/org/apache/lucene/index/ReaderSlice.java (revision 0) +++ lucene/core/src/java/org/apache/lucene/index/ReaderSlice.java (working copy) @@ -0,0 +1,41 @@ +package org.apache.lucene.index; + +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Subreader slice from a parent composite reader. + * + * @lucene.internal + */ +public final class ReaderSlice { + public static final ReaderSlice[] EMPTY_ARRAY = new ReaderSlice[0]; + public final int start; + public final int length; + public final int readerIndex; + + public ReaderSlice(int start, int length, int readerIndex) { + this.start = start; + this.length = length; + this.readerIndex = readerIndex; + } + + @Override + public String toString() { + return "slice start=" + start + " length=" + length + " readerIndex=" + readerIndex; + } +} \ No newline at end of file Index: lucene/core/src/java/org/apache/lucene/index/ReaderSlice.java =================================================================== --- lucene/core/src/java/org/apache/lucene/index/ReaderSlice.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/index/ReaderSlice.java (working copy) Property changes on: lucene/core/src/java/org/apache/lucene/index/ReaderSlice.java ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Id Revision HeadURL \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: lucene/core/src/java/org/apache/lucene/index/ReaderUtil.java =================================================================== --- lucene/core/src/java/org/apache/lucene/index/ReaderUtil.java (revision 0) +++ lucene/core/src/java/org/apache/lucene/index/ReaderUtil.java (working copy) @@ -0,0 +1,94 @@ +package org.apache.lucene.index; + +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.util.List; + + +/** + * Common util methods for dealing with {@link IndexReader}s and {@link IndexReaderContext}s. + * + * @lucene.internal + */ +public final class ReaderUtil { + + private ReaderUtil() {} // no instance + + /** + * Walks up the reader tree and return the given context's top level reader + * context, or in other words the reader tree's root context. + */ + public static IndexReaderContext getTopLevelContext(IndexReaderContext context) { + while (context.parent != null) { + context = context.parent; + } + return context; + } + + /** + * Returns index of the searcher/reader for document n in the + * array used to construct this searcher/reader. + */ + public static int subIndex(int n, int[] docStarts) { // find + // searcher/reader for doc n: + int size = docStarts.length; + int lo = 0; // search starts array + int hi = size - 1; // for first element less than n, return its index + while (hi >= lo) { + int mid = (lo + hi) >>> 1; + int midValue = docStarts[mid]; + if (n < midValue) + hi = mid - 1; + else if (n > midValue) + lo = mid + 1; + else { // found a match + while (mid + 1 < size && docStarts[mid + 1] == midValue) { + mid++; // scan to last match + } + return mid; + } + } + return hi; + } + + /** + * Returns index of the searcher/reader for document n in the + * array used to construct this searcher/reader. + */ + public static int subIndex(int n, List leaves) { // find + // searcher/reader for doc n: + int size = leaves.size(); + int lo = 0; // search starts array + int hi = size - 1; // for first element less than n, return its index + while (hi >= lo) { + int mid = (lo + hi) >>> 1; + int midValue = leaves.get(mid).docBase; + if (n < midValue) + hi = mid - 1; + else if (n > midValue) + lo = mid + 1; + else { // found a match + while (mid + 1 < size && leaves.get(mid + 1).docBase == midValue) { + mid++; // scan to last match + } + return mid; + } + } + return hi; + } +} Index: lucene/core/src/java/org/apache/lucene/index/ReaderUtil.java =================================================================== --- lucene/core/src/java/org/apache/lucene/index/ReaderUtil.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/index/ReaderUtil.java (working copy) Property changes on: lucene/core/src/java/org/apache/lucene/index/ReaderUtil.java ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: lucene/core/src/java/org/apache/lucene/index/SegmentMerger.java =================================================================== --- lucene/core/src/java/org/apache/lucene/index/SegmentMerger.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/index/SegmentMerger.java (working copy) @@ -34,8 +34,6 @@ import org.apache.lucene.util.Bits; import org.apache.lucene.util.IOUtils; import org.apache.lucene.util.InfoStream; -import org.apache.lucene.util.ReaderUtil; -import org.apache.lucene.util.ReaderSlice; /** * The SegmentMerger class combines two or more Segments, represented by an IndexReader ({@link #add}, Index: lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java =================================================================== --- lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java (working copy) @@ -39,13 +39,13 @@ import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.MultiFields; import org.apache.lucene.index.IndexReaderContext; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.index.StoredFieldVisitor; import org.apache.lucene.index.Term; import org.apache.lucene.index.Terms; import org.apache.lucene.search.similarities.DefaultSimilarity; import org.apache.lucene.search.similarities.Similarity; import org.apache.lucene.store.NIOFSDirectory; // javadoc -import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util.TermContext; import org.apache.lucene.util.ThreadInterruptedException; import org.apache.lucene.index.IndexWriter; // javadocs Index: lucene/core/src/java/org/apache/lucene/search/TermQuery.java =================================================================== --- lucene/core/src/java/org/apache/lucene/search/TermQuery.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/search/TermQuery.java (working copy) @@ -24,6 +24,7 @@ import org.apache.lucene.index.DocsEnum; import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.IndexReaderContext; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.index.Term; import org.apache.lucene.index.TermState; import org.apache.lucene.index.TermsEnum; @@ -31,7 +32,6 @@ import org.apache.lucene.search.similarities.Similarity; import org.apache.lucene.util.Bits; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util.TermContext; import org.apache.lucene.util.ToStringUtils; Index: lucene/core/src/java/org/apache/lucene/util/BitsSlice.java =================================================================== --- lucene/core/src/java/org/apache/lucene/util/BitsSlice.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/util/BitsSlice.java (working copy) @@ -1,46 +0,0 @@ -package org.apache.lucene.util; - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** Exposes a slice of an existing Bits as a new Bits. */ - -public final class BitsSlice implements Bits { - private final Bits parent; - private final int start; - private final int length; - - // start is inclusive; end is exclusive (length = end-start) - public BitsSlice(Bits parent, ReaderSlice slice) { - this.parent = parent; - this.start = slice.start; - this.length = slice.length; - assert length >= 0: "length=" + length; - } - - public boolean get(int doc) { - if (doc >= length) { - throw new RuntimeException("doc " + doc + " is out of bounds 0 .. " + (length-1)); - } - assert doc < length: "doc=" + doc + " length=" + length; - return parent.get(doc+start); - } - - public int length() { - return length; - } -} Index: lucene/core/src/java/org/apache/lucene/util/MultiBits.java =================================================================== --- lucene/core/src/java/org/apache/lucene/util/MultiBits.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/util/MultiBits.java (working copy) @@ -1,5 +1,8 @@ package org.apache.lucene.util; +import org.apache.lucene.index.ReaderSlice; +import org.apache.lucene.index.ReaderUtil; + /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -79,7 +82,7 @@ /** * Represents a sub-Bits from - * {@link MultiBits#getMatchingSub(org.apache.lucene.util.ReaderSlice) getMatchingSub()}. + * {@link MultiBits#getMatchingSub(org.apache.lucene.index.ReaderSlice) getMatchingSub()}. */ public final static class SubResult { public boolean matches; Index: lucene/core/src/java/org/apache/lucene/util/ReaderSlice.java =================================================================== --- lucene/core/src/java/org/apache/lucene/util/ReaderSlice.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/util/ReaderSlice.java (working copy) @@ -1,39 +0,0 @@ -package org.apache.lucene.util; - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Subreader slice from a parent composite reader. - */ -public final class ReaderSlice { - public static final ReaderSlice[] EMPTY_ARRAY = new ReaderSlice[0]; - public final int start; - public final int length; - public final int readerIndex; - - public ReaderSlice(int start, int length, int readerIndex) { - this.start = start; - this.length = length; - this.readerIndex = readerIndex; - } - - @Override - public String toString() { - return "slice start=" + start + " length=" + length + " readerIndex=" + readerIndex; - } -} \ No newline at end of file Index: lucene/core/src/java/org/apache/lucene/util/ReaderUtil.java =================================================================== --- lucene/core/src/java/org/apache/lucene/util/ReaderUtil.java (revision 1352563) +++ lucene/core/src/java/org/apache/lucene/util/ReaderUtil.java (working copy) @@ -1,97 +0,0 @@ -package org.apache.lucene.util; - -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; - -import org.apache.lucene.index.AtomicReaderContext; -import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.IndexReaderContext; - -/** - * Common util methods for dealing with {@link IndexReader}s. - * - * @lucene.internal - */ -public final class ReaderUtil { - - private ReaderUtil() {} // no instance - - /** - * Walks up the reader tree and return the given context's top level reader - * context, or in other words the reader tree's root context. - */ - public static IndexReaderContext getTopLevelContext(IndexReaderContext context) { - while (context.parent != null) { - context = context.parent; - } - return context; - } - - /** - * Returns index of the searcher/reader for document n in the - * array used to construct this searcher/reader. - */ - public static int subIndex(int n, int[] docStarts) { // find - // searcher/reader for doc n: - int size = docStarts.length; - int lo = 0; // search starts array - int hi = size - 1; // for first element less than n, return its index - while (hi >= lo) { - int mid = (lo + hi) >>> 1; - int midValue = docStarts[mid]; - if (n < midValue) - hi = mid - 1; - else if (n > midValue) - lo = mid + 1; - else { // found a match - while (mid + 1 < size && docStarts[mid + 1] == midValue) { - mid++; // scan to last match - } - return mid; - } - } - return hi; - } - - /** - * Returns index of the searcher/reader for document n in the - * array used to construct this searcher/reader. - */ - public static int subIndex(int n, List leaves) { // find - // searcher/reader for doc n: - int size = leaves.size(); - int lo = 0; // search starts array - int hi = size - 1; // for first element less than n, return its index - while (hi >= lo) { - int mid = (lo + hi) >>> 1; - int midValue = leaves.get(mid).docBase; - if (n < midValue) - hi = mid - 1; - else if (n > midValue) - lo = mid + 1; - else { // found a match - while (mid + 1 < size && leaves.get(mid + 1).docBase == midValue) { - mid++; // scan to last match - } - return mid; - } - } - return hi; - } -} Index: lucene/core/src/test/org/apache/lucene/search/spans/MultiSpansWrapper.java =================================================================== --- lucene/core/src/test/org/apache/lucene/search/spans/MultiSpansWrapper.java (revision 1352563) +++ lucene/core/src/test/org/apache/lucene/search/spans/MultiSpansWrapper.java (working copy) @@ -27,9 +27,9 @@ import org.apache.lucene.index.AtomicReaderContext; import org.apache.lucene.index.IndexReaderContext; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.index.Term; import org.apache.lucene.search.DocIdSetIterator; -import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util.TermContext; /** Index: lucene/core/src/test/org/apache/lucene/search/spans/TestSpans.java =================================================================== --- lucene/core/src/test/org/apache/lucene/search/spans/TestSpans.java (revision 1352563) +++ lucene/core/src/test/org/apache/lucene/search/spans/TestSpans.java (working copy) @@ -30,6 +30,7 @@ import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; import org.apache.lucene.index.RandomIndexWriter; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.index.Term; import org.apache.lucene.search.CheckHits; import org.apache.lucene.search.DocIdSetIterator; @@ -41,7 +42,6 @@ import org.apache.lucene.search.similarities.Similarity; import org.apache.lucene.store.Directory; import org.apache.lucene.util.LuceneTestCase; -import org.apache.lucene.util.ReaderUtil; public class TestSpans extends LuceneTestCase { private IndexSearcher searcher; Index: lucene/core/src/test/org/apache/lucene/search/TestTopDocsMerge.java =================================================================== --- lucene/core/src/test/org/apache/lucene/search/TestTopDocsMerge.java (revision 1352563) +++ lucene/core/src/test/org/apache/lucene/search/TestTopDocsMerge.java (working copy) @@ -31,10 +31,10 @@ import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexReaderContext; import org.apache.lucene.index.RandomIndexWriter; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.index.Term; import org.apache.lucene.store.Directory; import org.apache.lucene.util.LuceneTestCase; -import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util._TestUtil; public class TestTopDocsMerge extends LuceneTestCase { Index: lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java =================================================================== --- lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java (revision 1352563) +++ lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java (working copy) @@ -23,6 +23,7 @@ import org.apache.lucene.index.AtomicReaderContext; import org.apache.lucene.index.CompositeReaderContext; import org.apache.lucene.index.DirectoryReader; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.index.FieldInfo.IndexOptions; import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.index.IndexReaderContext; @@ -44,7 +45,6 @@ import org.apache.lucene.store.Directory; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.LuceneTestCase; -import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util._TestUtil; import org.apache.lucene.util.mutable.MutableValue; import org.apache.lucene.util.mutable.MutableValueStr; Index: lucene/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java =================================================================== --- lucene/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java (revision 1352563) +++ lucene/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java (working copy) @@ -23,6 +23,7 @@ import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.MultiFields; import org.apache.lucene.index.Fields; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.index.TermsEnum; import org.apache.lucene.index.FieldsEnum; import org.apache.lucene.index.Terms; @@ -32,7 +33,6 @@ import org.apache.lucene.util.PriorityQueue; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.Bits; -import org.apache.lucene.util.ReaderUtil; import java.io.File; import java.io.IOException; Index: lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/JoinDocFreqValueSource.java =================================================================== --- lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/JoinDocFreqValueSource.java (revision 1352563) +++ lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/JoinDocFreqValueSource.java (working copy) @@ -22,11 +22,11 @@ import org.apache.lucene.index.AtomicReaderContext; import org.apache.lucene.index.IndexReader; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.docvalues.IntDocValues; import org.apache.lucene.search.FieldCache.DocTerms; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util.packed.PackedInts; /** Index: lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/NumDocsValueSource.java =================================================================== --- lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/NumDocsValueSource.java (revision 1352563) +++ lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/NumDocsValueSource.java (working copy) @@ -17,9 +17,9 @@ package org.apache.lucene.queries.function.valuesource; import org.apache.lucene.index.AtomicReaderContext; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; -import org.apache.lucene.util.ReaderUtil; import java.io.IOException; import java.util.Map; Index: lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/OrdFieldSource.java =================================================================== --- lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/OrdFieldSource.java (revision 1352563) +++ lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/OrdFieldSource.java (working copy) @@ -21,12 +21,12 @@ import org.apache.lucene.index.AtomicReaderContext; import org.apache.lucene.index.CompositeReader; import org.apache.lucene.index.IndexReader; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.IntDocValues; import org.apache.lucene.search.FieldCache; -import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util.mutable.MutableValue; import org.apache.lucene.util.mutable.MutableValueInt; Index: lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/QueryValueSource.java =================================================================== --- lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/QueryValueSource.java (revision 1352563) +++ lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/QueryValueSource.java (working copy) @@ -18,12 +18,12 @@ package org.apache.lucene.queries.function.valuesource; import org.apache.lucene.index.AtomicReaderContext; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.FloatDocValues; import org.apache.lucene.search.*; import org.apache.lucene.util.Bits; -import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util.mutable.MutableValue; import org.apache.lucene.util.mutable.MutableValueFloat; Index: lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ReverseOrdFieldSource.java =================================================================== --- lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ReverseOrdFieldSource.java (revision 1352563) +++ lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ReverseOrdFieldSource.java (working copy) @@ -21,12 +21,12 @@ import org.apache.lucene.index.AtomicReaderContext; import org.apache.lucene.index.CompositeReader; import org.apache.lucene.index.IndexReader; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.IntDocValues; import org.apache.lucene.search.FieldCache; -import org.apache.lucene.util.ReaderUtil; import java.io.IOException; import java.util.Map; Index: lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java =================================================================== --- lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java (revision 1352563) +++ lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java (working copy) @@ -18,11 +18,11 @@ package org.apache.lucene.queries.function.valuesource; import org.apache.lucene.index.AtomicReaderContext; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.FloatDocValues; import org.apache.lucene.search.IndexSearcher; -import org.apache.lucene.util.ReaderUtil; import java.io.IOException; import java.util.List; Index: lucene/suggest/src/java/org/apache/lucene/search/spell/SpellChecker.java =================================================================== --- lucene/suggest/src/java/org/apache/lucene/search/spell/SpellChecker.java (revision 1352563) +++ lucene/suggest/src/java/org/apache/lucene/search/spell/SpellChecker.java (working copy) @@ -33,6 +33,7 @@ import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.index.Term; import org.apache.lucene.index.IndexWriterConfig.OpenMode; import org.apache.lucene.index.Terms; @@ -47,7 +48,6 @@ import org.apache.lucene.store.Directory; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRefIterator; -import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util.Version; /** Index: solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java =================================================================== --- solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java (revision 1352563) +++ solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java (working copy) @@ -21,6 +21,7 @@ import org.apache.lucene.document.StringField; import org.apache.lucene.index.AtomicReaderContext; import org.apache.lucene.index.IndexReaderContext; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.index.Term; import org.apache.lucene.queryparser.classic.ParseException; import org.apache.lucene.search.*; @@ -29,7 +30,6 @@ import org.apache.lucene.search.grouping.TopGroups; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.CharsRef; -import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util.UnicodeUtil; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.common.SolrDocument; Index: solr/core/src/java/org/apache/solr/response/transform/ValueSourceAugmenter.java =================================================================== --- solr/core/src/java/org/apache/solr/response/transform/ValueSourceAugmenter.java (revision 1352563) +++ solr/core/src/java/org/apache/solr/response/transform/ValueSourceAugmenter.java (working copy) @@ -22,9 +22,9 @@ import org.apache.lucene.index.AtomicReaderContext; import org.apache.lucene.index.IndexReader; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; -import org.apache.lucene.util.ReaderUtil; import org.apache.solr.common.SolrDocument; import org.apache.solr.common.SolrException; import org.apache.solr.search.QParser; Index: solr/core/src/java/org/apache/solr/schema/RandomSortField.java =================================================================== --- solr/core/src/java/org/apache/solr/schema/RandomSortField.java (revision 1352563) +++ solr/core/src/java/org/apache/solr/schema/RandomSortField.java (working copy) @@ -23,11 +23,11 @@ import org.apache.lucene.index.IndexableField; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.AtomicReaderContext; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.IntDocValues; import org.apache.lucene.search.*; -import org.apache.lucene.util.ReaderUtil; import org.apache.solr.response.TextResponseWriter; import org.apache.solr.search.QParser; Index: solr/core/src/java/org/apache/solr/search/function/FileFloatSource.java =================================================================== --- solr/core/src/java/org/apache/solr/search/function/FileFloatSource.java (revision 1352563) +++ solr/core/src/java/org/apache/solr/search/function/FileFloatSource.java (working copy) @@ -31,6 +31,7 @@ import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.MultiFields; import org.apache.lucene.index.IndexReaderContext; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.index.TermsEnum; import org.apache.lucene.index.AtomicReaderContext; import org.apache.lucene.queries.function.FunctionValues; @@ -38,7 +39,6 @@ import org.apache.lucene.queries.function.docvalues.FloatDocValues; import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.ReaderUtil; import org.apache.solr.core.SolrCore; import org.apache.solr.handler.RequestHandlerBase; import org.apache.solr.handler.RequestHandlerUtils; Index: solr/core/src/test/org/apache/solr/search/TestIndexSearcher.java =================================================================== --- solr/core/src/test/org/apache/solr/search/TestIndexSearcher.java (revision 1352563) +++ solr/core/src/test/org/apache/solr/search/TestIndexSearcher.java (working copy) @@ -18,9 +18,9 @@ import org.apache.lucene.index.AtomicReaderContext; import org.apache.lucene.index.IndexReaderContext; +import org.apache.lucene.index.ReaderUtil; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; -import org.apache.lucene.util.ReaderUtil; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.schema.SchemaField;