diff --git a/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java b/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java index 33947974bce..af4dcfcd7d4 100644 --- a/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java +++ b/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java @@ -661,7 +661,7 @@ public class MultiDocValues { public final OrdinalMap mapping; /** Creates a new MultiSortedDocValues over values */ - MultiSortedDocValues(SortedDocValues values[], int docStarts[], OrdinalMap mapping) throws IOException { + public MultiSortedDocValues(SortedDocValues values[], int docStarts[], OrdinalMap mapping) throws IOException { assert docStarts.length == values.length + 1; this.values = values; this.docStarts = docStarts; diff --git a/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java b/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java index 4cfb2874aa4..b1867546e38 100644 --- a/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java +++ b/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java @@ -36,12 +36,12 @@ import org.apache.lucene.search.DocValuesRangeQuery; import org.apache.lucene.search.Query; import org.apache.lucene.search.SortField; import org.apache.lucene.search.TermRangeQuery; -import org.apache.lucene.uninverting.UninvertingReader.Type; import org.apache.lucene.util.BytesRef; -import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException.ErrorCode; +import org.apache.solr.common.SolrException; import org.apache.solr.response.TextResponseWriter; import org.apache.solr.search.QParser; +import org.apache.solr.uninverting.UninvertingReader.Type; import com.ibm.icu.text.Collator; import com.ibm.icu.text.RuleBasedCollator; diff --git a/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java b/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java index c38d1b52844..76b38fa3ebe 100644 --- a/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java +++ b/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java @@ -26,16 +26,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import com.carrotsearch.hppc.IntHashSet; -import com.carrotsearch.hppc.IntObjectHashMap; -import com.carrotsearch.hppc.LongHashSet; -import com.carrotsearch.hppc.LongObjectHashMap; -import com.carrotsearch.hppc.LongObjectMap; -import com.carrotsearch.hppc.cursors.IntObjectCursor; -import com.carrotsearch.hppc.cursors.LongCursor; -import com.carrotsearch.hppc.cursors.LongObjectCursor; -import com.carrotsearch.hppc.cursors.ObjectCursor; - import org.apache.lucene.index.DocValues; import org.apache.lucene.index.DocValuesType; import org.apache.lucene.index.FieldInfo; @@ -53,7 +43,6 @@ import org.apache.lucene.search.Collector; import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.search.LeafCollector; import org.apache.lucene.search.Query; -import org.apache.solr.search.QueryWrapperFilter; import org.apache.lucene.search.ScoreDoc; import org.apache.lucene.search.Scorer; import org.apache.lucene.search.Sort; @@ -61,7 +50,6 @@ import org.apache.lucene.search.TopDocs; import org.apache.lucene.search.TopDocsCollector; import org.apache.lucene.search.TopFieldCollector; import org.apache.lucene.search.TopScoreDocCollector; -import org.apache.lucene.uninverting.UninvertingReader; import org.apache.lucene.util.BitSetIterator; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRefBuilder; @@ -87,12 +75,24 @@ import org.apache.solr.search.DocIterator; import org.apache.solr.search.DocList; import org.apache.solr.search.DocSlice; import org.apache.solr.search.QParser; +import org.apache.solr.search.QueryWrapperFilter; import org.apache.solr.search.SolrConstantScoreQuery; import org.apache.solr.search.SolrIndexSearcher; import org.apache.solr.search.SortSpecParsing; +import org.apache.solr.uninverting.UninvertingReader; import org.apache.solr.util.plugin.PluginInfoInitialized; import org.apache.solr.util.plugin.SolrCoreAware; +import com.carrotsearch.hppc.IntHashSet; +import com.carrotsearch.hppc.IntObjectHashMap; +import com.carrotsearch.hppc.LongHashSet; +import com.carrotsearch.hppc.LongObjectHashMap; +import com.carrotsearch.hppc.LongObjectMap; +import com.carrotsearch.hppc.cursors.IntObjectCursor; +import com.carrotsearch.hppc.cursors.LongCursor; +import com.carrotsearch.hppc.cursors.LongObjectCursor; +import com.carrotsearch.hppc.cursors.ObjectCursor; + /** * The ExpandComponent is designed to work with the CollapsingPostFilter. * The CollapsingPostFilter collapses a result set on a field. diff --git a/lucene/misc/src/java/org/apache/lucene/index/SlowCompositeReaderWrapper.java b/solr/core/src/java/org/apache/solr/index/SlowCompositeReaderWrapper.java similarity index 89% rename from lucene/misc/src/java/org/apache/lucene/index/SlowCompositeReaderWrapper.java rename to solr/core/src/java/org/apache/solr/index/SlowCompositeReaderWrapper.java index de711fda460..fd188505f29 100644 --- a/lucene/misc/src/java/org/apache/lucene/index/SlowCompositeReaderWrapper.java +++ b/solr/core/src/java/org/apache/solr/index/SlowCompositeReaderWrapper.java @@ -14,16 +14,36 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.index; - +package org.apache.solr.index; import java.io.IOException; import java.util.HashMap; import java.util.Map; +import org.apache.lucene.index.BinaryDocValues; +import org.apache.lucene.index.CompositeReader; +import org.apache.lucene.index.DirectoryReader; +import org.apache.lucene.index.DocValues; +import org.apache.lucene.index.DocValuesType; +import org.apache.lucene.index.FieldInfo; +import org.apache.lucene.index.FieldInfos; +import org.apache.lucene.index.Fields; +import org.apache.lucene.index.IndexReader; +import org.apache.lucene.index.LeafReader.CoreClosedListener; +import org.apache.lucene.index.LeafReader; +import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.MultiDocValues.MultiSortedDocValues; import org.apache.lucene.index.MultiDocValues.MultiSortedSetDocValues; import org.apache.lucene.index.MultiDocValues.OrdinalMap; +import org.apache.lucene.index.MultiDocValues; +import org.apache.lucene.index.MultiFields; +import org.apache.lucene.index.MultiReader; +import org.apache.lucene.index.NumericDocValues; +import org.apache.lucene.index.PointValues; +import org.apache.lucene.index.SortedDocValues; +import org.apache.lucene.index.SortedNumericDocValues; +import org.apache.lucene.index.SortedSetDocValues; +import org.apache.lucene.index.StoredFieldVisitor; import org.apache.lucene.search.Sort; import org.apache.lucene.util.Bits; diff --git a/solr/core/src/java/org/apache/solr/index/SortingMergePolicy.java b/solr/core/src/java/org/apache/solr/index/SortingMergePolicy.java index b58d0a4ba16..7b334b15c88 100644 --- a/solr/core/src/java/org/apache/solr/index/SortingMergePolicy.java +++ b/solr/core/src/java/org/apache/solr/index/SortingMergePolicy.java @@ -33,13 +33,13 @@ import org.apache.lucene.index.SegmentCommitInfo; import org.apache.lucene.index.SegmentInfo; import org.apache.lucene.index.SegmentInfos; import org.apache.lucene.index.SegmentReader; -import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.search.Sort; import org.apache.lucene.store.Directory; import org.apache.lucene.util.Bits; import org.apache.lucene.util.InfoStream; import org.apache.lucene.util.packed.PackedInts; import org.apache.lucene.util.packed.PackedLongValues; +import org.apache.solr.index.SlowCompositeReaderWrapper; // TODO: remove this and add indexSort specification directly to solrconfig.xml? But for BWC, also accept SortingMergePolicy specifiction? diff --git a/solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.java b/solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.java index 39d45c22a08..3130004593c 100644 --- a/solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.java +++ b/solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.java @@ -28,6 +28,7 @@ import java.util.Set; import java.util.TreeSet; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; + import org.apache.lucene.document.Field; import org.apache.lucene.document.StoredField; import org.apache.lucene.index.IndexableField; @@ -41,22 +42,16 @@ import org.apache.lucene.spatial.SpatialStrategy; import org.apache.lucene.spatial.query.SpatialArgs; import org.apache.lucene.spatial.query.SpatialArgsParser; import org.apache.lucene.spatial.query.SpatialOperation; -import org.apache.lucene.uninverting.UninvertingReader.Type; -import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException.ErrorCode; +import org.apache.solr.common.SolrException; import org.apache.solr.common.params.SolrParams; import org.apache.solr.response.TextResponseWriter; import org.apache.solr.search.QParser; import org.apache.solr.search.SpatialOptions; +import org.apache.solr.uninverting.UninvertingReader.Type; import org.apache.solr.util.DistanceUnits; import org.apache.solr.util.MapListener; import org.apache.solr.util.SpatialUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.google.common.base.Throwables; -import com.google.common.cache.Cache; -import com.google.common.cache.CacheBuilder; import org.locationtech.spatial4j.context.SpatialContext; import org.locationtech.spatial4j.context.SpatialContextFactory; import org.locationtech.spatial4j.distance.DistanceUtils; @@ -66,6 +61,12 @@ import org.locationtech.spatial4j.io.SupportedFormats; import org.locationtech.spatial4j.shape.Point; import org.locationtech.spatial4j.shape.Rectangle; import org.locationtech.spatial4j.shape.Shape; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.common.base.Throwables; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; /** * Abstract base class for Solr FieldTypes based on a Lucene 4 {@link SpatialStrategy}. diff --git a/solr/core/src/java/org/apache/solr/schema/BinaryField.java b/solr/core/src/java/org/apache/solr/schema/BinaryField.java index 4e5bfee25c4..889bd3c4523 100644 --- a/solr/core/src/java/org/apache/solr/schema/BinaryField.java +++ b/solr/core/src/java/org/apache/solr/schema/BinaryField.java @@ -23,10 +23,10 @@ import java.nio.ByteBuffer; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexableField; import org.apache.lucene.search.SortField; -import org.apache.lucene.uninverting.UninvertingReader.Type; import org.apache.lucene.util.BytesRef; import org.apache.solr.common.util.Base64; import org.apache.solr.response.TextResponseWriter; +import org.apache.solr.uninverting.UninvertingReader.Type; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/solr/core/src/java/org/apache/solr/schema/BoolField.java b/solr/core/src/java/org/apache/solr/schema/BoolField.java index f86a6a327ce..01161e72ada 100644 --- a/solr/core/src/java/org/apache/solr/schema/BoolField.java +++ b/solr/core/src/java/org/apache/solr/schema/BoolField.java @@ -22,15 +22,14 @@ import java.util.Map; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; -import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.DocValues; -import org.apache.lucene.index.SortedDocValues; import org.apache.lucene.index.IndexableField; +import org.apache.lucene.index.LeafReaderContext; +import org.apache.lucene.index.SortedDocValues; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.docvalues.BoolDocValues; import org.apache.lucene.search.SortField; -import org.apache.lucene.uninverting.UninvertingReader.Type; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.CharsRef; import org.apache.lucene.util.CharsRefBuilder; @@ -40,6 +39,7 @@ import org.apache.solr.analysis.SolrAnalyzer; import org.apache.solr.response.TextResponseWriter; import org.apache.solr.search.QParser; import org.apache.solr.search.function.OrdFieldSource; +import org.apache.solr.uninverting.UninvertingReader.Type; /** * */ diff --git a/solr/core/src/java/org/apache/solr/schema/CollationField.java b/solr/core/src/java/org/apache/solr/schema/CollationField.java index ad6d8723da3..998db2ac336 100644 --- a/solr/core/src/java/org/apache/solr/schema/CollationField.java +++ b/solr/core/src/java/org/apache/solr/schema/CollationField.java @@ -40,12 +40,12 @@ import org.apache.lucene.search.DocValuesRangeQuery; import org.apache.lucene.search.Query; import org.apache.lucene.search.SortField; import org.apache.lucene.search.TermRangeQuery; -import org.apache.lucene.uninverting.UninvertingReader.Type; import org.apache.lucene.util.BytesRef; -import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException.ErrorCode; +import org.apache.solr.common.SolrException; import org.apache.solr.response.TextResponseWriter; import org.apache.solr.search.QParser; +import org.apache.solr.uninverting.UninvertingReader.Type; /** * Field for collated sort keys. diff --git a/solr/core/src/java/org/apache/solr/schema/CurrencyField.java b/solr/core/src/java/org/apache/solr/schema/CurrencyField.java index 5a0bb1a8a85..26ea1675e2d 100644 --- a/solr/core/src/java/org/apache/solr/schema/CurrencyField.java +++ b/solr/core/src/java/org/apache/solr/schema/CurrencyField.java @@ -44,7 +44,7 @@ import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.FieldValueQuery; import org.apache.lucene.search.Query; import org.apache.lucene.search.SortField; -import org.apache.lucene.uninverting.UninvertingReader.Type; +import org.apache.solr.uninverting.UninvertingReader.Type; import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException.ErrorCode; import org.apache.solr.response.TextResponseWriter; diff --git a/solr/core/src/java/org/apache/solr/schema/EnumField.java b/solr/core/src/java/org/apache/solr/schema/EnumField.java index cbf1d4eb9e8..27f3a0a1ea8 100644 --- a/solr/core/src/java/org/apache/solr/schema/EnumField.java +++ b/solr/core/src/java/org/apache/solr/schema/EnumField.java @@ -16,12 +16,6 @@ */ package org.apache.solr.schema; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.xpath.XPath; -import javax.xml.xpath.XPathConstants; -import javax.xml.xpath.XPathExpressionException; -import javax.xml.xpath.XPathFactory; import java.io.IOException; import java.io.InputStream; import java.lang.invoke.MethodHandles; @@ -31,6 +25,12 @@ import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathConstants; +import javax.xml.xpath.XPathExpressionException; +import javax.xml.xpath.XPathFactory; import org.apache.lucene.document.FieldType; import org.apache.lucene.document.LegacyIntField; @@ -45,7 +45,6 @@ import org.apache.lucene.search.DocValuesRangeQuery; import org.apache.lucene.search.LegacyNumericRangeQuery; import org.apache.lucene.search.Query; import org.apache.lucene.search.SortField; -import org.apache.lucene.uninverting.UninvertingReader.Type; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRefBuilder; import org.apache.lucene.util.CharsRef; @@ -55,6 +54,7 @@ import org.apache.solr.common.EnumFieldValue; import org.apache.solr.common.SolrException; import org.apache.solr.response.TextResponseWriter; import org.apache.solr.search.QParser; +import org.apache.solr.uninverting.UninvertingReader.Type; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; diff --git a/solr/core/src/java/org/apache/solr/schema/ExternalFileField.java b/solr/core/src/java/org/apache/solr/schema/ExternalFileField.java index da35650e94d..feba4e0fdff 100644 --- a/solr/core/src/java/org/apache/solr/schema/ExternalFileField.java +++ b/solr/core/src/java/org/apache/solr/schema/ExternalFileField.java @@ -16,17 +16,17 @@ */ package org.apache.solr.schema; +import java.io.IOException; +import java.util.Map; + import org.apache.lucene.index.IndexableField; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.search.SortField; -import org.apache.lucene.uninverting.UninvertingReader.Type; import org.apache.solr.common.SolrException; import org.apache.solr.response.TextResponseWriter; import org.apache.solr.search.QParser; import org.apache.solr.search.function.FileFloatSource; - -import java.io.IOException; -import java.util.Map; +import org.apache.solr.uninverting.UninvertingReader.Type; /** Get values from an external file instead of the index. * diff --git a/solr/core/src/java/org/apache/solr/schema/FieldType.java b/solr/core/src/java/org/apache/solr/schema/FieldType.java index ab89f94c575..6556ddb77f6 100644 --- a/solr/core/src/java/org/apache/solr/schema/FieldType.java +++ b/solr/core/src/java/org/apache/solr/schema/FieldType.java @@ -49,7 +49,6 @@ import org.apache.lucene.search.SortedNumericSelector; import org.apache.lucene.search.SortedSetSelector; import org.apache.lucene.search.TermQuery; import org.apache.lucene.search.similarities.Similarity; -import org.apache.lucene.uninverting.UninvertingReader; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRefBuilder; import org.apache.lucene.util.CharsRef; @@ -66,6 +65,7 @@ import org.apache.solr.query.SolrRangeQuery; import org.apache.solr.response.TextResponseWriter; import org.apache.solr.search.QParser; import org.apache.solr.search.Sorting; +import org.apache.solr.uninverting.UninvertingReader; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/solr/core/src/java/org/apache/solr/schema/GeoHashField.java b/solr/core/src/java/org/apache/solr/schema/GeoHashField.java index 2baf72e192b..3f0d765a270 100644 --- a/solr/core/src/java/org/apache/solr/schema/GeoHashField.java +++ b/solr/core/src/java/org/apache/solr/schema/GeoHashField.java @@ -18,23 +18,23 @@ package org.apache.solr.schema; import java.io.IOException; -import org.locationtech.spatial4j.context.SpatialContext; -import org.locationtech.spatial4j.distance.DistanceUtils; -import org.locationtech.spatial4j.io.GeohashUtils; -import org.locationtech.spatial4j.shape.Point; import org.apache.lucene.index.IndexableField; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.valuesource.LiteralValueSource; import org.apache.lucene.search.Query; import org.apache.lucene.search.SortField; -import org.apache.lucene.uninverting.UninvertingReader.Type; import org.apache.solr.response.TextResponseWriter; import org.apache.solr.search.QParser; import org.apache.solr.search.SolrConstantScoreQuery; import org.apache.solr.search.SpatialOptions; import org.apache.solr.search.function.ValueSourceRangeFilter; import org.apache.solr.search.function.distance.GeohashHaversineFunction; +import org.apache.solr.uninverting.UninvertingReader.Type; import org.apache.solr.util.SpatialUtils; +import org.locationtech.spatial4j.context.SpatialContext; +import org.locationtech.spatial4j.distance.DistanceUtils; +import org.locationtech.spatial4j.io.GeohashUtils; +import org.locationtech.spatial4j.shape.Point; /** * This is a class that represents a TextField is the basic type for configurable text analysis. * Analyzers for field types using this implementation should be defined in the schema. diff --git a/solr/core/src/java/org/apache/solr/schema/TrieField.java b/solr/core/src/java/org/apache/solr/schema/TrieField.java index 3483909143f..b7bac1c5313 100644 --- a/solr/core/src/java/org/apache/solr/schema/TrieField.java +++ b/solr/core/src/java/org/apache/solr/schema/TrieField.java @@ -26,8 +26,8 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import org.apache.lucene.document.FieldType; import org.apache.lucene.document.FieldType.LegacyNumericType; +import org.apache.lucene.document.FieldType; import org.apache.lucene.document.LegacyDoubleField; import org.apache.lucene.document.LegacyFloatField; import org.apache.lucene.document.LegacyIntField; @@ -47,7 +47,6 @@ import org.apache.lucene.search.LegacyNumericRangeQuery; import org.apache.lucene.search.Query; import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortedSetSelector; -import org.apache.lucene.uninverting.UninvertingReader.Type; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRefBuilder; import org.apache.lucene.util.CharsRef; @@ -61,6 +60,7 @@ import org.apache.solr.response.TextResponseWriter; import org.apache.solr.search.FunctionRangeQuery; import org.apache.solr.search.QParser; import org.apache.solr.search.function.ValueSourceRangeFilter; +import org.apache.solr.uninverting.UninvertingReader.Type; import org.apache.solr.util.DateMathParser; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java index 5686fe1143a..0cb6682b6db 100644 --- a/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java +++ b/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java @@ -25,15 +25,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import com.carrotsearch.hppc.FloatArrayList; -import com.carrotsearch.hppc.IntArrayList; -import com.carrotsearch.hppc.IntIntHashMap; -import com.carrotsearch.hppc.IntLongHashMap; -import com.carrotsearch.hppc.cursors.IntIntCursor; -import com.carrotsearch.hppc.cursors.IntLongCursor; - import org.apache.commons.lang.StringUtils; - import org.apache.lucene.index.DocValues; import org.apache.lucene.index.DocValuesType; import org.apache.lucene.index.FieldInfo; @@ -49,13 +41,12 @@ import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.search.FieldComparator; -import org.apache.lucene.search.LeafFieldComparator; import org.apache.lucene.search.IndexSearcher; +import org.apache.lucene.search.LeafFieldComparator; import org.apache.lucene.search.Query; import org.apache.lucene.search.Scorer; import org.apache.lucene.search.Sort; import org.apache.lucene.search.SortField; -import org.apache.lucene.uninverting.UninvertingReader; import org.apache.lucene.util.ArrayUtil; import org.apache.lucene.util.BitSetIterator; import org.apache.lucene.util.BytesRef; @@ -65,8 +56,8 @@ import org.apache.solr.common.SolrException; import org.apache.solr.common.params.ModifiableSolrParams; import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.util.NamedList; -import org.apache.solr.handler.component.ResponseBuilder; import org.apache.solr.handler.component.QueryElevationComponent; +import org.apache.solr.handler.component.ResponseBuilder; import org.apache.solr.request.LocalSolrQueryRequest; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.request.SolrRequestInfo; @@ -75,6 +66,14 @@ import org.apache.solr.schema.StrField; import org.apache.solr.schema.TrieFloatField; import org.apache.solr.schema.TrieIntField; import org.apache.solr.schema.TrieLongField; +import org.apache.solr.uninverting.UninvertingReader; + +import com.carrotsearch.hppc.FloatArrayList; +import com.carrotsearch.hppc.IntArrayList; +import com.carrotsearch.hppc.IntIntHashMap; +import com.carrotsearch.hppc.IntLongHashMap; +import com.carrotsearch.hppc.cursors.IntIntCursor; +import com.carrotsearch.hppc.cursors.IntLongCursor; /** diff --git a/solr/core/src/java/org/apache/solr/search/Insanity.java b/solr/core/src/java/org/apache/solr/search/Insanity.java index 2a1edc71b16..7f16797b8f4 100644 --- a/solr/core/src/java/org/apache/solr/search/Insanity.java +++ b/solr/core/src/java/org/apache/solr/search/Insanity.java @@ -20,16 +20,16 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Collections; -import org.apache.lucene.index.FilterLeafReader; -import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.BinaryDocValues; import org.apache.lucene.index.DocValuesType; import org.apache.lucene.index.FieldInfo; import org.apache.lucene.index.FieldInfos; +import org.apache.lucene.index.FilterLeafReader; +import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.NumericDocValues; import org.apache.lucene.index.SortedDocValues; import org.apache.lucene.index.SortedSetDocValues; -import org.apache.lucene.uninverting.UninvertingReader; +import org.apache.solr.uninverting.UninvertingReader; /** * Lucene 5.0 removes "accidental" insanity, so you must explicitly diff --git a/solr/core/src/java/org/apache/solr/search/SolrFieldCacheMBean.java b/solr/core/src/java/org/apache/solr/search/SolrFieldCacheMBean.java index da997081c2e..3f5d9e981a4 100644 --- a/solr/core/src/java/org/apache/solr/search/SolrFieldCacheMBean.java +++ b/solr/core/src/java/org/apache/solr/search/SolrFieldCacheMBean.java @@ -18,13 +18,12 @@ package org.apache.solr.search; import java.net.URL; -import org.apache.lucene.uninverting.UninvertingReader; import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.SimpleOrderedMap; - +import org.apache.solr.core.JmxMonitoredMap.JmxAugmentedSolrInfoMBean; import org.apache.solr.core.SolrCore; import org.apache.solr.core.SolrInfoMBean; -import org.apache.solr.core.JmxMonitoredMap.JmxAugmentedSolrInfoMBean; +import org.apache.solr.uninverting.UninvertingReader; /** * A SolrInfoMBean that provides introspection of the Solr FieldCache diff --git a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java index 113fd90dac8..33d616ec808 100644 --- a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java +++ b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java @@ -53,7 +53,6 @@ import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.MultiPostingsEnum; import org.apache.lucene.index.NumericDocValues; import org.apache.lucene.index.PostingsEnum; -import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.index.SortedDocValues; import org.apache.lucene.index.SortedSetDocValues; import org.apache.lucene.index.StoredFieldVisitor; @@ -94,7 +93,6 @@ import org.apache.lucene.search.TopScoreDocCollector; import org.apache.lucene.search.TotalHitCountCollector; import org.apache.lucene.search.Weight; import org.apache.lucene.store.Directory; -import org.apache.lucene.uninverting.UninvertingReader; import org.apache.lucene.util.Bits; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.FixedBitSet; @@ -109,6 +107,7 @@ import org.apache.solr.core.DirectoryFactory.DirContext; import org.apache.solr.core.SolrConfig; import org.apache.solr.core.SolrCore; import org.apache.solr.core.SolrInfoMBean; +import org.apache.solr.index.SlowCompositeReaderWrapper; import org.apache.solr.request.LocalSolrQueryRequest; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.request.SolrRequestInfo; @@ -122,6 +121,7 @@ import org.apache.solr.schema.TrieFloatField; import org.apache.solr.schema.TrieIntField; import org.apache.solr.search.facet.UnInvertedField; import org.apache.solr.search.stats.StatsSource; +import org.apache.solr.uninverting.UninvertingReader; import org.apache.solr.update.IndexFingerprint; import org.apache.solr.update.SolrIndexConfig; import org.slf4j.Logger; diff --git a/solr/core/src/java/org/apache/solr/search/facet/UnInvertedField.java b/solr/core/src/java/org/apache/solr/search/facet/UnInvertedField.java index c1613cde680..b52b3335cb9 100644 --- a/solr/core/src/java/org/apache/solr/search/facet/UnInvertedField.java +++ b/solr/core/src/java/org/apache/solr/search/facet/UnInvertedField.java @@ -27,17 +27,16 @@ import java.util.concurrent.atomic.AtomicLong; import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.LeafReaderContext; -import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.index.Term; import org.apache.lucene.index.TermsEnum; import org.apache.lucene.search.Query; import org.apache.lucene.search.TermQuery; -import org.apache.lucene.uninverting.DocTermOrds; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.CharsRefBuilder; import org.apache.lucene.util.FixedBitSet; import org.apache.solr.common.SolrException; import org.apache.solr.core.SolrCore; +import org.apache.solr.index.SlowCompositeReaderWrapper; import org.apache.solr.schema.FieldType; import org.apache.solr.schema.TrieField; import org.apache.solr.search.BitDocSet; @@ -45,6 +44,7 @@ import org.apache.solr.search.DocIterator; import org.apache.solr.search.DocSet; import org.apache.solr.search.SolrCache; import org.apache.solr.search.SolrIndexSearcher; +import org.apache.solr.uninverting.DocTermOrds; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/solr/core/src/java/org/apache/solr/search/function/OrdFieldSource.java b/solr/core/src/java/org/apache/solr/search/function/OrdFieldSource.java index 8a9d6950138..3b63bd99cb9 100644 --- a/solr/core/src/java/org/apache/solr/search/function/OrdFieldSource.java +++ b/solr/core/src/java/org/apache/solr/search/function/OrdFieldSource.java @@ -20,13 +20,12 @@ import java.io.IOException; import java.util.List; import java.util.Map; -import org.apache.lucene.index.LeafReader; -import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.DocValues; import org.apache.lucene.index.IndexReader; +import org.apache.lucene.index.LeafReader; +import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.MultiReader; import org.apache.lucene.index.ReaderUtil; -import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.index.SortedDocValues; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; @@ -34,6 +33,7 @@ import org.apache.lucene.queries.function.docvalues.IntDocValues; import org.apache.lucene.search.SortedSetSelector; import org.apache.lucene.util.mutable.MutableValue; import org.apache.lucene.util.mutable.MutableValueInt; +import org.apache.solr.index.SlowCompositeReaderWrapper; import org.apache.solr.schema.SchemaField; import org.apache.solr.search.Insanity; import org.apache.solr.search.SolrIndexSearcher; diff --git a/solr/core/src/java/org/apache/solr/search/function/ReverseOrdFieldSource.java b/solr/core/src/java/org/apache/solr/search/function/ReverseOrdFieldSource.java index 9375d969154..abc9f95426a 100644 --- a/solr/core/src/java/org/apache/solr/search/function/ReverseOrdFieldSource.java +++ b/solr/core/src/java/org/apache/solr/search/function/ReverseOrdFieldSource.java @@ -20,18 +20,18 @@ import java.io.IOException; import java.util.List; import java.util.Map; -import org.apache.lucene.index.LeafReader; -import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.DocValues; import org.apache.lucene.index.IndexReader; +import org.apache.lucene.index.LeafReader; +import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.MultiReader; import org.apache.lucene.index.ReaderUtil; -import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.index.SortedDocValues; 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.SortedSetSelector; +import org.apache.solr.index.SlowCompositeReaderWrapper; import org.apache.solr.schema.SchemaField; import org.apache.solr.search.Insanity; import org.apache.solr.search.SolrIndexSearcher; diff --git a/solr/core/src/java/org/apache/solr/search/join/ScoreJoinQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/join/ScoreJoinQParserPlugin.java index 93a4b20d295..6bd7952094a 100644 --- a/solr/core/src/java/org/apache/solr/search/join/ScoreJoinQParserPlugin.java +++ b/solr/core/src/java/org/apache/solr/search/join/ScoreJoinQParserPlugin.java @@ -25,7 +25,6 @@ import org.apache.lucene.index.IndexReader; import org.apache.lucene.search.Query; import org.apache.lucene.search.join.JoinUtil; import org.apache.lucene.search.join.ScoreMode; -import org.apache.lucene.uninverting.UninvertingReader; import org.apache.solr.cloud.ZkController; import org.apache.solr.common.SolrException; import org.apache.solr.common.cloud.Aliases; @@ -45,6 +44,7 @@ import org.apache.solr.search.QParser; import org.apache.solr.search.QParserPlugin; import org.apache.solr.search.SolrIndexSearcher; import org.apache.solr.search.SyntaxError; +import org.apache.solr.uninverting.UninvertingReader; import org.apache.solr.util.RefCounted; /** diff --git a/lucene/misc/src/java/org/apache/lucene/uninverting/DocTermOrds.java b/solr/core/src/java/org/apache/solr/uninverting/DocTermOrds.java similarity index 98% rename from lucene/misc/src/java/org/apache/lucene/uninverting/DocTermOrds.java rename to solr/core/src/java/org/apache/solr/uninverting/DocTermOrds.java index 3600acd01a6..4b60dbad087 100644 --- a/lucene/misc/src/java/org/apache/lucene/uninverting/DocTermOrds.java +++ b/solr/core/src/java/org/apache/solr/uninverting/DocTermOrds.java @@ -14,19 +14,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.uninverting; +package org.apache.solr.uninverting; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.concurrent.TimeUnit; import org.apache.lucene.codecs.PostingsFormat; // javadocs import org.apache.lucene.index.DocValues; import org.apache.lucene.index.DocValuesType; -import org.apache.lucene.index.PostingsEnum; import org.apache.lucene.index.FieldInfo; import org.apache.lucene.index.LeafReader; +import org.apache.lucene.index.PostingsEnum; import org.apache.lucene.index.SortedSetDocValues; import org.apache.lucene.index.Terms; import org.apache.lucene.index.TermsEnum; @@ -276,7 +277,7 @@ public class DocTermOrds implements Accountable { throw new IllegalStateException("Type mismatch: " + field + " was indexed as " + info.getDocValuesType()); } //System.out.println("DTO uninvert field=" + field + " prefix=" + termPrefix); - final long startTime = System.currentTimeMillis(); + final long startTime = System.nanoTime(); prefix = termPrefix == null ? null : BytesRef.deepCopyOf(termPrefix); final int maxDoc = reader.maxDoc(); @@ -444,7 +445,7 @@ public class DocTermOrds implements Accountable { numTermsInField = termNum; - long midPoint = System.currentTimeMillis(); + long midPoint = System.nanoTime(); if (termInstances == 0) { // we didn't invert anything @@ -533,10 +534,10 @@ public class DocTermOrds implements Accountable { } indexedTermsArray = indexedTerms.toArray(new BytesRef[indexedTerms.size()]); - long endTime = System.currentTimeMillis(); + long endTime = System.nanoTime(); - total_time = (int)(endTime-startTime); - phase1_time = (int)(midPoint-startTime); + total_time = (int) TimeUnit.MILLISECONDS.convert(endTime-startTime, TimeUnit.NANOSECONDS); + phase1_time = (int) TimeUnit.MILLISECONDS.convert(midPoint-startTime, TimeUnit.NANOSECONDS); } /** Number of bytes to represent an unsigned int as a vint. */ diff --git a/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCache.java b/solr/core/src/java/org/apache/solr/uninverting/FieldCache.java similarity index 99% rename from lucene/misc/src/java/org/apache/lucene/uninverting/FieldCache.java rename to solr/core/src/java/org/apache/solr/uninverting/FieldCache.java index 11185a903e9..7ef495618e2 100644 --- a/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCache.java +++ b/solr/core/src/java/org/apache/solr/uninverting/FieldCache.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.uninverting; +package org.apache.solr.uninverting; import java.io.IOException; import java.io.PrintStream; diff --git a/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCacheImpl.java b/solr/core/src/java/org/apache/solr/uninverting/FieldCacheImpl.java similarity index 99% rename from lucene/misc/src/java/org/apache/lucene/uninverting/FieldCacheImpl.java rename to solr/core/src/java/org/apache/solr/uninverting/FieldCacheImpl.java index 589da132d29..e6a066d8767 100644 --- a/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCacheImpl.java +++ b/solr/core/src/java/org/apache/solr/uninverting/FieldCacheImpl.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.uninverting; +package org.apache.solr.uninverting; import java.io.IOException; import java.io.PrintStream; diff --git a/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCacheSanityChecker.java b/solr/core/src/java/org/apache/solr/uninverting/FieldCacheSanityChecker.java similarity index 99% rename from lucene/misc/src/java/org/apache/lucene/uninverting/FieldCacheSanityChecker.java rename to solr/core/src/java/org/apache/solr/uninverting/FieldCacheSanityChecker.java index e41857e8e30..ec398f2174a 100644 --- a/lucene/misc/src/java/org/apache/lucene/uninverting/FieldCacheSanityChecker.java +++ b/solr/core/src/java/org/apache/solr/uninverting/FieldCacheSanityChecker.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.uninverting; +package org.apache.solr.uninverting; import java.util.ArrayList; import java.util.Collection; @@ -27,8 +27,8 @@ import java.util.Set; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexReaderContext; import org.apache.lucene.store.AlreadyClosedException; -import org.apache.lucene.uninverting.FieldCache.CacheEntry; import org.apache.lucene.util.MapOfSets; +import org.apache.solr.uninverting.FieldCache.CacheEntry; /** * Provides methods for sanity checking that entries in the FieldCache diff --git a/lucene/misc/src/java/org/apache/lucene/uninverting/UninvertingReader.java b/solr/core/src/java/org/apache/solr/uninverting/UninvertingReader.java similarity index 99% rename from lucene/misc/src/java/org/apache/lucene/uninverting/UninvertingReader.java rename to solr/core/src/java/org/apache/solr/uninverting/UninvertingReader.java index 10d1a5b9b3c..4450cbb7d86 100644 --- a/lucene/misc/src/java/org/apache/lucene/uninverting/UninvertingReader.java +++ b/solr/core/src/java/org/apache/solr/uninverting/UninvertingReader.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.uninverting; +package org.apache.solr.uninverting; import java.io.IOException; import java.util.ArrayList; @@ -37,8 +37,8 @@ import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.NumericDocValues; import org.apache.lucene.index.SortedDocValues; import org.apache.lucene.index.SortedSetDocValues; -import org.apache.lucene.uninverting.FieldCache.CacheEntry; import org.apache.lucene.util.Bits; +import org.apache.solr.uninverting.FieldCache.CacheEntry; /** * A FilterReader that exposes indexed values as if they also had diff --git a/lucene/misc/src/java/org/apache/lucene/uninverting/package-info.java b/solr/core/src/java/org/apache/solr/uninverting/package-info.java similarity index 95% rename from lucene/misc/src/java/org/apache/lucene/uninverting/package-info.java rename to solr/core/src/java/org/apache/solr/uninverting/package-info.java index a4e8521d04a..d95e08fd6a5 100644 --- a/lucene/misc/src/java/org/apache/lucene/uninverting/package-info.java +++ b/solr/core/src/java/org/apache/solr/uninverting/package-info.java @@ -18,4 +18,4 @@ /** * Support for creating docvalues on-the-fly from the inverted index at runtime. */ -package org.apache.lucene.uninverting; +package org.apache.solr.uninverting; diff --git a/solr/core/src/java/org/apache/solr/update/DeleteByQueryWrapper.java b/solr/core/src/java/org/apache/solr/update/DeleteByQueryWrapper.java index 3d871616484..778e4c6ad80 100644 --- a/solr/core/src/java/org/apache/solr/update/DeleteByQueryWrapper.java +++ b/solr/core/src/java/org/apache/solr/update/DeleteByQueryWrapper.java @@ -29,8 +29,9 @@ import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.Query; import org.apache.lucene.search.Scorer; import org.apache.lucene.search.Weight; -import org.apache.lucene.uninverting.UninvertingReader; import org.apache.solr.schema.IndexSchema; +import org.apache.solr.uninverting.UninvertingReader; +import org.apache.solr.uninverting.UninvertingReader; /** * Allows access to uninverted docvalues by delete-by-queries. diff --git a/solr/core/src/java/org/apache/solr/update/VersionInfo.java b/solr/core/src/java/org/apache/solr/update/VersionInfo.java index 5fe415c6110..bee30f500d8 100644 --- a/solr/core/src/java/org/apache/solr/update/VersionInfo.java +++ b/solr/core/src/java/org/apache/solr/update/VersionInfo.java @@ -24,7 +24,6 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.LeafReaderContext; -import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.index.Terms; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; @@ -34,6 +33,7 @@ import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.LegacyNumericUtils; import org.apache.solr.common.SolrException; import org.apache.solr.common.util.SuppressForbidden; +import org.apache.solr.index.SlowCompositeReaderWrapper; import org.apache.solr.schema.IndexSchema; import org.apache.solr.schema.SchemaField; import org.apache.solr.search.SolrIndexSearcher; diff --git a/lucene/misc/src/test/org/apache/lucene/index/TestSlowCompositeReaderWrapper.java b/solr/core/src/test/org/apache/solr/index/TestSlowCompositeReaderWrapper.java similarity index 93% rename from lucene/misc/src/test/org/apache/lucene/index/TestSlowCompositeReaderWrapper.java rename to solr/core/src/test/org/apache/solr/index/TestSlowCompositeReaderWrapper.java index d37e45abebf..0685e5525d3 100644 --- a/lucene/misc/src/test/org/apache/lucene/index/TestSlowCompositeReaderWrapper.java +++ b/solr/core/src/test/org/apache/solr/index/TestSlowCompositeReaderWrapper.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.index; +package org.apache.solr.index; import java.io.IOException; import java.util.ArrayList; @@ -23,6 +23,10 @@ import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import org.apache.lucene.document.Document; +import org.apache.lucene.index.DirectoryReader; +import org.apache.lucene.index.IndexReader; +import org.apache.lucene.index.LeafReader; +import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; diff --git a/solr/core/src/test/org/apache/solr/request/TestFaceting.java b/solr/core/src/test/org/apache/solr/request/TestFaceting.java index 97dcedfe6a0..4dd49e18202 100644 --- a/solr/core/src/test/org/apache/solr/request/TestFaceting.java +++ b/solr/core/src/test/org/apache/solr/request/TestFaceting.java @@ -25,12 +25,12 @@ import org.apache.lucene.index.DocValues; import org.apache.lucene.index.SortedSetDocValues; import org.apache.lucene.index.Term; import org.apache.lucene.index.TermsEnum; -import org.apache.lucene.uninverting.DocTermOrds; import org.apache.lucene.util.BytesRef; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.common.SolrException.ErrorCode; import org.apache.solr.common.params.FacetParams; import org.apache.solr.search.SolrIndexSearcher; +import org.apache.solr.uninverting.DocTermOrds; import org.apache.solr.util.RefCounted; import org.junit.After; import org.junit.BeforeClass; diff --git a/solr/core/src/test/org/apache/solr/search/TestSort.java b/solr/core/src/test/org/apache/solr/search/TestSort.java index e874c373e2d..8590b18cf97 100644 --- a/solr/core/src/test/org/apache/solr/search/TestSort.java +++ b/solr/core/src/test/org/apache/solr/search/TestSort.java @@ -42,13 +42,12 @@ import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.LeafCollector; import org.apache.lucene.search.ScoreDoc; import org.apache.lucene.search.Sort; -import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortField.Type; +import org.apache.lucene.search.SortField; import org.apache.lucene.search.TopDocs; import org.apache.lucene.search.TopFieldCollector; import org.apache.lucene.store.Directory; import org.apache.lucene.store.RAMDirectory; -import org.apache.lucene.uninverting.UninvertingReader; import org.apache.lucene.util.BitDocIdSet; import org.apache.lucene.util.Bits; import org.apache.lucene.util.FixedBitSet; @@ -56,6 +55,7 @@ import org.apache.lucene.util.TestUtil; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.schema.SchemaField; +import org.apache.solr.uninverting.UninvertingReader; import org.junit.BeforeClass; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/lucene/misc/src/test/org/apache/lucene/uninverting/TestDocTermOrds.java b/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrds.java similarity index 99% rename from lucene/misc/src/test/org/apache/lucene/uninverting/TestDocTermOrds.java rename to solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrds.java index 0c5d765b8cd..f1627a6ee35 100644 --- a/lucene/misc/src/test/org/apache/lucene/uninverting/TestDocTermOrds.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrds.java @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.uninverting; +package org.apache.solr.uninverting; import java.io.IOException; -import java.util.Arrays; -import java.util.List; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashSet; +import java.util.List; import java.util.Set; import org.apache.lucene.analysis.Analyzer; @@ -31,28 +31,28 @@ import org.apache.lucene.document.Field; import org.apache.lucene.document.LegacyIntField; import org.apache.lucene.document.LegacyLongField; import org.apache.lucene.document.StringField; -import org.apache.lucene.index.LeafReader; -import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.DocValues; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; +import org.apache.lucene.index.LeafReader; +import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.MultiFields; import org.apache.lucene.index.NumericDocValues; import org.apache.lucene.index.RandomIndexWriter; -import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.index.SortedSetDocValues; import org.apache.lucene.index.Term; import org.apache.lucene.index.Terms; -import org.apache.lucene.index.TermsEnum; import org.apache.lucene.index.TermsEnum.SeekStatus; +import org.apache.lucene.index.TermsEnum; import org.apache.lucene.store.Directory; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.LegacyNumericUtils; +import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.StringHelper; import org.apache.lucene.util.TestUtil; +import org.apache.solr.index.SlowCompositeReaderWrapper; // TODO: // - test w/ del docs diff --git a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCache.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCache.java similarity index 99% rename from lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCache.java rename to solr/core/src/test/org/apache/solr/uninverting/TestFieldCache.java index 93c302c51e7..af9ea952f6e 100644 --- a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCache.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCache.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.uninverting; +package org.apache.solr.uninverting; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -31,11 +31,11 @@ import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.document.BinaryDocValuesField; import org.apache.lucene.document.Document; import org.apache.lucene.document.DoublePoint; -import org.apache.lucene.document.LegacyDoubleField; -import org.apache.lucene.document.Field; import org.apache.lucene.document.Field.Store; +import org.apache.lucene.document.Field; import org.apache.lucene.document.FloatPoint; import org.apache.lucene.document.IntPoint; +import org.apache.lucene.document.LegacyDoubleField; import org.apache.lucene.document.LegacyFloatField; import org.apache.lucene.document.LegacyIntField; import org.apache.lucene.document.LegacyLongField; @@ -44,16 +44,15 @@ import org.apache.lucene.document.NumericDocValuesField; import org.apache.lucene.document.SortedDocValuesField; import org.apache.lucene.document.SortedSetDocValuesField; import org.apache.lucene.document.StoredField; -import org.apache.lucene.index.LeafReader; -import org.apache.lucene.index.LogDocMergePolicy; import org.apache.lucene.index.BinaryDocValues; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; +import org.apache.lucene.index.LeafReader; +import org.apache.lucene.index.LogDocMergePolicy; import org.apache.lucene.index.NumericDocValues; import org.apache.lucene.index.RandomIndexWriter; -import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.index.SortedDocValues; import org.apache.lucene.index.SortedSetDocValues; import org.apache.lucene.index.Terms; @@ -65,6 +64,7 @@ import org.apache.lucene.util.IOUtils; import org.apache.lucene.util.LegacyNumericUtils; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; +import org.apache.solr.index.SlowCompositeReaderWrapper; import org.junit.AfterClass; import org.junit.BeforeClass; diff --git a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheReopen.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheReopen.java similarity index 98% rename from lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheReopen.java rename to solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheReopen.java index de8eab1db77..18c64202163 100644 --- a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheReopen.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheReopen.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.uninverting; +package org.apache.solr.uninverting; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.document.Document; diff --git a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheSanityChecker.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSanityChecker.java similarity index 95% rename from lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheSanityChecker.java rename to solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSanityChecker.java index f5c62e291c3..d54d5792447 100644 --- a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheSanityChecker.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSanityChecker.java @@ -14,26 +14,26 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.uninverting; +package org.apache.solr.uninverting; import java.io.IOException; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.document.Document; -import org.apache.lucene.document.LegacyDoubleField; import org.apache.lucene.document.Field; +import org.apache.lucene.document.LegacyDoubleField; import org.apache.lucene.document.LegacyFloatField; import org.apache.lucene.document.LegacyIntField; import org.apache.lucene.document.LegacyLongField; -import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.IndexWriter; +import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.MultiReader; -import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.store.Directory; -import org.apache.lucene.uninverting.FieldCacheSanityChecker.Insanity; -import org.apache.lucene.uninverting.FieldCacheSanityChecker.InsanityType; import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.index.SlowCompositeReaderWrapper; +import org.apache.solr.uninverting.FieldCacheSanityChecker.Insanity; +import org.apache.solr.uninverting.FieldCacheSanityChecker.InsanityType; public class TestFieldCacheSanityChecker extends LuceneTestCase { diff --git a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheSort.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSort.java similarity index 99% rename from lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheSort.java rename to solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSort.java index f46bdde0c93..34d92379b39 100644 --- a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheSort.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSort.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.uninverting; +package org.apache.solr.uninverting; import java.io.IOException; import java.util.Collections; @@ -51,7 +51,7 @@ import org.apache.lucene.search.SortField; import org.apache.lucene.search.TermQuery; import org.apache.lucene.search.TopDocs; import org.apache.lucene.store.Directory; -import org.apache.lucene.uninverting.UninvertingReader.Type; +import org.apache.solr.uninverting.UninvertingReader.Type; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; diff --git a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheSortRandom.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSortRandom.java similarity index 99% rename from lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheSortRandom.java rename to solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSortRandom.java index 6a810444b6c..6f2e17cc1df 100644 --- a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheSortRandom.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSortRandom.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.uninverting; +package org.apache.solr.uninverting; import java.io.IOException; import java.util.ArrayList; @@ -50,12 +50,12 @@ import org.apache.lucene.search.SortField; import org.apache.lucene.search.TopFieldDocs; import org.apache.lucene.search.Weight; import org.apache.lucene.store.Directory; -import org.apache.lucene.uninverting.UninvertingReader.Type; import org.apache.lucene.util.BitSetIterator; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.FixedBitSet; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; +import org.apache.solr.uninverting.UninvertingReader.Type; /** random sorting tests with uninversion */ public class TestFieldCacheSortRandom extends LuceneTestCase { diff --git a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheVsDocValues.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheVsDocValues.java similarity index 99% rename from lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheVsDocValues.java rename to solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheVsDocValues.java index 9809324e059..0f7a13f820c 100644 --- a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheVsDocValues.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheVsDocValues.java @@ -14,9 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.uninverting; - -import static org.apache.lucene.index.SortedSetDocValues.NO_MORE_ORDS; +package org.apache.solr.uninverting; import java.util.ArrayList; import java.util.Collections; @@ -31,26 +29,28 @@ import org.apache.lucene.document.NumericDocValuesField; import org.apache.lucene.document.SortedDocValuesField; import org.apache.lucene.document.SortedSetDocValuesField; import org.apache.lucene.document.StringField; -import org.apache.lucene.index.LeafReader; -import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.BinaryDocValues; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.DocValues; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; +import org.apache.lucene.index.LeafReader; +import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.RandomIndexWriter; -import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.index.SortedDocValues; import org.apache.lucene.index.SortedSetDocValues; import org.apache.lucene.index.Term; -import org.apache.lucene.index.TermsEnum; import org.apache.lucene.index.TermsEnum.SeekStatus; +import org.apache.lucene.index.TermsEnum; import org.apache.lucene.store.Directory; import org.apache.lucene.util.Bits; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.Constants; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; +import org.apache.solr.index.SlowCompositeReaderWrapper; + +import static org.apache.lucene.index.SortedSetDocValues.NO_MORE_ORDS; public class TestFieldCacheVsDocValues extends LuceneTestCase { diff --git a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheWithThreads.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheWithThreads.java similarity index 97% rename from lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheWithThreads.java rename to solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheWithThreads.java index 3f1f450d01f..b0801fed9bb 100644 --- a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheWithThreads.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheWithThreads.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.uninverting; +package org.apache.solr.uninverting; import java.io.IOException; import java.util.ArrayList; @@ -23,17 +23,18 @@ import java.util.List; import java.util.Random; import java.util.Set; import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.document.BinaryDocValuesField; import org.apache.lucene.document.Document; import org.apache.lucene.document.NumericDocValuesField; import org.apache.lucene.document.SortedDocValuesField; -import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.BinaryDocValues; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; +import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.NumericDocValues; import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.index.SortedDocValues; @@ -183,7 +184,7 @@ public class TestFieldCacheWithThreads extends LuceneTestCase { final LeafReader sr = getOnlyLeafReader(r); - final long END_TIME = System.currentTimeMillis() + (TEST_NIGHTLY ? 30 : 1); + final long END_TIME = System.nanoTime() + TimeUnit.NANOSECONDS.convert((TEST_NIGHTLY ? 30 : 1), TimeUnit.SECONDS); final int NUM_THREADS = TestUtil.nextInt(random(), 1, 10); Thread[] threads = new Thread[NUM_THREADS]; @@ -201,7 +202,7 @@ public class TestFieldCacheWithThreads extends LuceneTestCase { } catch (IOException ioe) { throw new RuntimeException(ioe); } - while(System.currentTimeMillis() < END_TIME) { + while(System.nanoTime() < END_TIME) { final SortedDocValues source; source = stringDVDirect; diff --git a/lucene/misc/src/test/org/apache/lucene/uninverting/TestLegacyFieldCache.java b/solr/core/src/test/org/apache/solr/uninverting/TestLegacyFieldCache.java similarity index 99% rename from lucene/misc/src/test/org/apache/lucene/uninverting/TestLegacyFieldCache.java rename to solr/core/src/test/org/apache/solr/uninverting/TestLegacyFieldCache.java index 4fd66ad05ea..1192f4b77c8 100644 --- a/lucene/misc/src/test/org/apache/lucene/uninverting/TestLegacyFieldCache.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestLegacyFieldCache.java @@ -14,12 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.uninverting; +package org.apache.solr.uninverting; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; - import java.util.concurrent.CyclicBarrier; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; @@ -27,9 +26,9 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.document.BinaryDocValuesField; import org.apache.lucene.document.Document; -import org.apache.lucene.document.LegacyDoubleField; -import org.apache.lucene.document.Field; import org.apache.lucene.document.Field.Store; +import org.apache.lucene.document.Field; +import org.apache.lucene.document.LegacyDoubleField; import org.apache.lucene.document.LegacyFloatField; import org.apache.lucene.document.LegacyIntField; import org.apache.lucene.document.LegacyLongField; @@ -37,14 +36,13 @@ import org.apache.lucene.document.NumericDocValuesField; import org.apache.lucene.document.SortedDocValuesField; import org.apache.lucene.document.SortedSetDocValuesField; import org.apache.lucene.document.StoredField; -import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; +import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.NumericDocValues; import org.apache.lucene.index.RandomIndexWriter; -import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.index.Terms; import org.apache.lucene.index.TermsEnum; import org.apache.lucene.store.Directory; @@ -54,6 +52,7 @@ import org.apache.lucene.util.IOUtils; import org.apache.lucene.util.LegacyNumericUtils; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; +import org.apache.solr.index.SlowCompositeReaderWrapper; import org.junit.AfterClass; import org.junit.BeforeClass; diff --git a/lucene/misc/src/test/org/apache/lucene/uninverting/TestNumericTerms32.java b/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms32.java similarity index 98% rename from lucene/misc/src/test/org/apache/lucene/uninverting/TestNumericTerms32.java rename to solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms32.java index a0cddf88c6b..2b861adb43d 100644 --- a/lucene/misc/src/test/org/apache/lucene/uninverting/TestNumericTerms32.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms32.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.uninverting; +package org.apache.solr.uninverting; import java.util.HashMap; import java.util.Map; @@ -33,9 +33,9 @@ import org.apache.lucene.search.Sort; import org.apache.lucene.search.SortField; import org.apache.lucene.search.TopDocs; import org.apache.lucene.store.Directory; -import org.apache.lucene.uninverting.UninvertingReader.Type; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; +import org.apache.solr.uninverting.UninvertingReader.Type; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; diff --git a/lucene/misc/src/test/org/apache/lucene/uninverting/TestNumericTerms64.java b/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms64.java similarity index 98% rename from lucene/misc/src/test/org/apache/lucene/uninverting/TestNumericTerms64.java rename to solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms64.java index 0724d86feeb..4da8be98c0f 100644 --- a/lucene/misc/src/test/org/apache/lucene/uninverting/TestNumericTerms64.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms64.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.uninverting; +package org.apache.solr.uninverting; import java.util.HashMap; import java.util.Map; @@ -33,9 +33,9 @@ import org.apache.lucene.search.Sort; import org.apache.lucene.search.SortField; import org.apache.lucene.search.TopDocs; import org.apache.lucene.store.Directory; -import org.apache.lucene.uninverting.UninvertingReader.Type; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; +import org.apache.solr.uninverting.UninvertingReader.Type; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; diff --git a/lucene/misc/src/test/org/apache/lucene/uninverting/TestUninvertingReader.java b/solr/core/src/test/org/apache/solr/uninverting/TestUninvertingReader.java similarity index 98% rename from lucene/misc/src/test/org/apache/lucene/uninverting/TestUninvertingReader.java rename to solr/core/src/test/org/apache/solr/uninverting/TestUninvertingReader.java index 0a1cf3d4048..2ecc63e6d11 100644 --- a/lucene/misc/src/test/org/apache/lucene/uninverting/TestUninvertingReader.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestUninvertingReader.java @@ -14,42 +14,42 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.lucene.uninverting; +package org.apache.solr.uninverting; import java.io.IOException; +import java.util.Collections; import java.util.EnumSet; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; -import java.util.Collections; -import org.apache.lucene.document.IntPoint; import org.apache.lucene.document.Document; +import org.apache.lucene.document.Field.Store; import org.apache.lucene.document.Field; import org.apache.lucene.document.FieldType; +import org.apache.lucene.document.IntPoint; import org.apache.lucene.document.LegacyIntField; import org.apache.lucene.document.LegacyLongField; import org.apache.lucene.document.NumericDocValuesField; import org.apache.lucene.document.StoredField; import org.apache.lucene.document.StringField; -import org.apache.lucene.document.Field.Store; +import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.DocValues; import org.apache.lucene.index.DocValuesType; import org.apache.lucene.index.FieldInfo; +import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.LeafReaderContext; -import org.apache.lucene.index.DirectoryReader; -import org.apache.lucene.index.IndexWriter; -import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.index.SortedSetDocValues; import org.apache.lucene.store.Directory; -import org.apache.lucene.uninverting.UninvertingReader.Type; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.LegacyNumericUtils; +import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; +import org.apache.solr.index.SlowCompositeReaderWrapper; +import org.apache.solr.uninverting.UninvertingReader.Type; public class TestUninvertingReader extends LuceneTestCase { diff --git a/solr/core/src/test/org/apache/solr/update/DocumentBuilderTest.java b/solr/core/src/test/org/apache/solr/update/DocumentBuilderTest.java index 88727457017..6e6b30ebf62 100644 --- a/solr/core/src/test/org/apache/solr/update/DocumentBuilderTest.java +++ b/solr/core/src/test/org/apache/solr/update/DocumentBuilderTest.java @@ -22,25 +22,24 @@ import org.apache.lucene.document.Document; import org.apache.lucene.index.IndexableField; import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.NumericDocValues; -import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.search.similarities.ClassicSimilarity; import org.apache.lucene.util.TestUtil; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.common.SolrDocument; -import org.apache.solr.common.params.CommonParams; import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrInputDocument; import org.apache.solr.common.SolrInputField; +import org.apache.solr.common.params.CommonParams; import org.apache.solr.core.SolrCore; +import org.apache.solr.index.SlowCompositeReaderWrapper; +import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.response.ResultContext; -import org.apache.solr.search.SolrIndexSearcher; -import org.apache.solr.search.DocList; +import org.apache.solr.response.SolrQueryResponse; import org.apache.solr.schema.CopyField; import org.apache.solr.schema.FieldType; import org.apache.solr.schema.IndexSchema; -import org.apache.solr.request.SolrQueryRequest; -import org.apache.solr.response.SolrQueryResponse; - +import org.apache.solr.search.DocList; +import org.apache.solr.search.SolrIndexSearcher; import org.junit.BeforeClass; import org.junit.Test;