From 639f03475a2d1454152d4f9e6731d173901ed360 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Sun, 11 May 2014 20:17:12 +0000 Subject: [PATCH] LUCENE-5666: move out more uninverting git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene5666@1593850 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/search/TestDocTermOrdsRangeFilter.java | 3 ++- .../org/apache/lucene/uninverting}/DocTermOrds.java | 11 ++++++++++- .../org/apache/lucene/uninverting/FieldCache.java | 1 - .../org/apache/lucene/uninverting/FieldCacheImpl.java | 1 - .../apache/lucene/uninverting/TestDocTermOrds.java | 1 - .../org/apache/lucene/uninverting/TestFieldCache.java | 1 - 6 files changed, 12 insertions(+), 6 deletions(-) rename lucene/{core/src/java/org/apache/lucene/index => misc/src/java/org/apache/lucene/uninverting}/DocTermOrds.java (98%) diff --git a/lucene/core/src/test/org/apache/lucene/search/TestDocTermOrdsRangeFilter.java b/lucene/core/src/test/org/apache/lucene/search/TestDocTermOrdsRangeFilter.java index 2bcc6117499..4d38f81979f 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestDocTermOrdsRangeFilter.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestDocTermOrdsRangeFilter.java @@ -33,12 +33,14 @@ import org.apache.lucene.index.Term; import org.apache.lucene.store.Directory; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.LuceneTestCase; +import org.apache.lucene.util.LuceneTestCase.SuppressCodecs; import org.apache.lucene.util.TestUtil; import org.apache.lucene.util.UnicodeUtil; /** * Tests the DocTermOrdsRangeFilter */ +@SuppressCodecs({"Lucene40", "Lucene41", "Lucene42"}) // needs SORTED_SET public class TestDocTermOrdsRangeFilter extends LuceneTestCase { protected IndexSearcher searcher1; protected IndexSearcher searcher2; @@ -49,7 +51,6 @@ public class TestDocTermOrdsRangeFilter extends LuceneTestCase { @Override public void setUp() throws Exception { super.setUp(); - assumeTrue("requires codec support for SORTED_SET", defaultCodecSupportsSortedSet()); dir = newDirectory(); fieldName = random().nextBoolean() ? "field" : ""; // sometimes use an empty string as field name RandomIndexWriter writer = new RandomIndexWriter(random(), dir, diff --git a/lucene/core/src/java/org/apache/lucene/index/DocTermOrds.java b/lucene/misc/src/java/org/apache/lucene/uninverting/DocTermOrds.java similarity index 98% rename from lucene/core/src/java/org/apache/lucene/index/DocTermOrds.java rename to lucene/misc/src/java/org/apache/lucene/uninverting/DocTermOrds.java index 19059640fa8..4559fd86f9c 100644 --- a/lucene/core/src/java/org/apache/lucene/index/DocTermOrds.java +++ b/lucene/misc/src/java/org/apache/lucene/uninverting/DocTermOrds.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.lucene.index; +package org.apache.lucene.uninverting; import java.io.IOException; import java.util.ArrayList; @@ -23,6 +23,15 @@ import java.util.Arrays; import java.util.List; import org.apache.lucene.codecs.PostingsFormat; // javadocs +import org.apache.lucene.index.AtomicReader; +import org.apache.lucene.index.DocValues; +import org.apache.lucene.index.DocsAndPositionsEnum; +import org.apache.lucene.index.DocsEnum; +import org.apache.lucene.index.FieldInfo; +import org.apache.lucene.index.Fields; +import org.apache.lucene.index.SortedSetDocValues; +import org.apache.lucene.index.Terms; +import org.apache.lucene.index.TermsEnum; import org.apache.lucene.index.TermsEnum.SeekStatus; import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.util.Bits; diff --git a/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCache.java b/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCache.java index 12a24d308a0..665653972df 100644 --- a/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCache.java +++ b/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCache.java @@ -28,7 +28,6 @@ import org.apache.lucene.document.LongField; import org.apache.lucene.document.NumericDocValuesField; import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.BinaryDocValues; -import org.apache.lucene.index.DocTermOrds; import org.apache.lucene.index.IndexReader; // javadocs import org.apache.lucene.index.NumericDocValues; import org.apache.lucene.index.SortedDocValues; diff --git a/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCacheImpl.java b/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCacheImpl.java index c92cb02412c..0bfca7a641e 100644 --- a/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCacheImpl.java +++ b/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCacheImpl.java @@ -27,7 +27,6 @@ import java.util.WeakHashMap; import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.BinaryDocValues; -import org.apache.lucene.index.DocTermOrds; import org.apache.lucene.index.DocValues; import org.apache.lucene.index.DocsEnum; import org.apache.lucene.index.FieldInfo; diff --git a/lucene/misc/src/test/org/apache/lucene/uninverting/TestDocTermOrds.java b/lucene/misc/src/test/org/apache/lucene/uninverting/TestDocTermOrds.java index 5e4170604fa..766b0f442d8 100644 --- a/lucene/misc/src/test/org/apache/lucene/uninverting/TestDocTermOrds.java +++ b/lucene/misc/src/test/org/apache/lucene/uninverting/TestDocTermOrds.java @@ -35,7 +35,6 @@ import org.apache.lucene.document.StringField; import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.AtomicReaderContext; import org.apache.lucene.index.DirectoryReader; -import org.apache.lucene.index.DocTermOrds; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; diff --git a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCache.java b/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCache.java index 94c3107a22d..9ec2b2041f1 100644 --- a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCache.java +++ b/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCache.java @@ -43,7 +43,6 @@ import org.apache.lucene.document.StoredField; import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.BinaryDocValues; import org.apache.lucene.index.DirectoryReader; -import org.apache.lucene.index.DocTermOrds; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig;