diff --git a/dev-tools/eclipse/dot.classpath b/dev-tools/eclipse/dot.classpath
index 6de80f0b85f..5589282b3ec 100644
--- a/dev-tools/eclipse/dot.classpath
+++ b/dev-tools/eclipse/dot.classpath
@@ -13,7 +13,6 @@
SearcherManager
in
- * contrib/misc
to simplify managing this.
+ * {@link SearcherManager} to simplify managing this.
*
* @throws CorruptIndexException if the index is corrupt
* @throws IOException if there is a low-level IO error
diff --git a/lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/appending/AppendingCodec.java b/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingCodec.java
similarity index 99%
rename from lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/appending/AppendingCodec.java
rename to lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingCodec.java
index 255a5099073..a821acdbd97 100644
--- a/lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/appending/AppendingCodec.java
+++ b/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingCodec.java
@@ -80,7 +80,7 @@ public class AppendingCodec extends Codec {
public FieldInfosFormat fieldInfosFormat() {
return fieldInfos;
}
-
+
@Override
public NormsFormat normsFormat() {
return norms;
diff --git a/lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/appending/AppendingPostingsFormat.java b/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingPostingsFormat.java
similarity index 100%
rename from lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/appending/AppendingPostingsFormat.java
rename to lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingPostingsFormat.java
diff --git a/lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/appending/AppendingSegmentInfosFormat.java b/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingSegmentInfosFormat.java
similarity index 100%
rename from lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/appending/AppendingSegmentInfosFormat.java
rename to lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingSegmentInfosFormat.java
diff --git a/lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/appending/AppendingSegmentInfosWriter.java b/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingSegmentInfosWriter.java
similarity index 100%
rename from lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/appending/AppendingSegmentInfosWriter.java
rename to lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingSegmentInfosWriter.java
diff --git a/lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsDictReader.java b/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsDictReader.java
similarity index 100%
rename from lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsDictReader.java
rename to lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsDictReader.java
diff --git a/lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsDictWriter.java b/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsDictWriter.java
similarity index 100%
rename from lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsDictWriter.java
rename to lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsDictWriter.java
diff --git a/lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsIndexReader.java b/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsIndexReader.java
similarity index 100%
rename from lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsIndexReader.java
rename to lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsIndexReader.java
diff --git a/lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsIndexWriter.java b/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsIndexWriter.java
similarity index 100%
rename from lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsIndexWriter.java
rename to lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsIndexWriter.java
diff --git a/lucene/src/resources/META-INF/services/org.apache.lucene.index.codecs.Codec b/lucene/src/resources/META-INF/services/org.apache.lucene.index.codecs.Codec
index de644791164..d87ffb46b06 100644
--- a/lucene/src/resources/META-INF/services/org.apache.lucene.index.codecs.Codec
+++ b/lucene/src/resources/META-INF/services/org.apache.lucene.index.codecs.Codec
@@ -16,3 +16,4 @@
org.apache.lucene.index.codecs.lucene40.Lucene40Codec
org.apache.lucene.index.codecs.lucene3x.Lucene3xCodec
org.apache.lucene.index.codecs.simpletext.SimpleTextCodec
+org.apache.lucene.index.codecs.appending.AppendingCodec
diff --git a/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCase.java b/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCase.java
index 08c83c8f584..ca44d8d209b 100644
--- a/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCase.java
+++ b/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCase.java
@@ -40,6 +40,7 @@ import org.apache.lucene.document.FieldType;
import org.apache.lucene.index.*;
import org.apache.lucene.index.codecs.Codec;
import org.apache.lucene.index.codecs.PostingsFormat;
+import org.apache.lucene.index.codecs.appending.AppendingCodec;
import org.apache.lucene.index.codecs.lucene40.Lucene40Codec;
import org.apache.lucene.index.codecs.preflexrw.PreFlexRWCodec;
import org.apache.lucene.index.codecs.simpletext.SimpleTextCodec;
@@ -286,6 +287,8 @@ public abstract class LuceneTestCase extends Assert {
PREFLEX_IMPERSONATION_IS_ACTIVE = true;
} else if ("SimpleText".equals(TEST_CODEC) || ("random".equals(TEST_CODEC) && randomVal == 9)) {
codec = new SimpleTextCodec();
+ } else if ("Appending".equals(TEST_CODEC) || ("random".equals(TEST_CODEC) && randomVal == 8)) {
+ codec = new AppendingCodec();
} else if (!"random".equals(TEST_CODEC)) {
codec = Codec.forName(TEST_CODEC);
} else if ("random".equals(TEST_POSTINGSFORMAT)) {
diff --git a/lucene/contrib/misc/src/test/org/apache/lucene/index/codecs/appending/TestAppendingCodec.java b/lucene/src/test/org/apache/lucene/index/codecs/appending/TestAppendingCodec.java
similarity index 100%
rename from lucene/contrib/misc/src/test/org/apache/lucene/index/codecs/appending/TestAppendingCodec.java
rename to lucene/src/test/org/apache/lucene/index/codecs/appending/TestAppendingCodec.java
diff --git a/solr/core/src/java/org/apache/solr/schema/ByteField.java b/solr/core/src/java/org/apache/solr/schema/ByteField.java
index f584bf9528b..093c0dde9cc 100644
--- a/solr/core/src/java/org/apache/solr/schema/ByteField.java
+++ b/solr/core/src/java/org/apache/solr/schema/ByteField.java
@@ -28,7 +28,21 @@ import java.io.IOException;
import java.util.Map;
/**
+ * A numeric field that can contain 8-bit signed two's complement integer
+ * values, encoded as simple Strings.
*
+ *
+ * Field values will sort numerically, but Range Queries (and other features + * that rely on numeric ranges) will not work as expected: values will be + * evaluated in unicode String order, not numeric order. + *
+ * + *+ * Field values will sort numerically, but Range Queries (and other features + * that rely on numeric ranges) will not work as expected: values will be + * evaluated in unicode String order, not numeric order. + *
+ * + * @see TrieDoubleField */ public class DoubleField extends FieldType { @Override diff --git a/solr/core/src/java/org/apache/solr/schema/FloatField.java b/solr/core/src/java/org/apache/solr/schema/FloatField.java index e784d70d756..4229638dc96 100644 --- a/solr/core/src/java/org/apache/solr/schema/FloatField.java +++ b/solr/core/src/java/org/apache/solr/schema/FloatField.java @@ -27,7 +27,18 @@ import org.apache.solr.response.TextResponseWriter; import java.util.Map; import java.io.IOException; /** + * A legacy numeric field type that encodes "Float" values as simple Strings. + * This class should not be used except by people with existing indexes that + * contain numeric values indexed as Strings. + * New schemas should use {@link TrieFloatField}. * + *+ * Field values will sort numerically, but Range Queries (and other features + * that rely on numeric ranges) will not work as expected: values will be + * evaluated in unicode String order, not numeric order. + *
+ * + * @see TrieFloatField */ public class FloatField extends FieldType { @Override diff --git a/solr/core/src/java/org/apache/solr/schema/IntField.java b/solr/core/src/java/org/apache/solr/schema/IntField.java index 3c1b1944cd8..c074d5338cd 100644 --- a/solr/core/src/java/org/apache/solr/schema/IntField.java +++ b/solr/core/src/java/org/apache/solr/schema/IntField.java @@ -27,7 +27,18 @@ import org.apache.solr.response.TextResponseWriter; import java.util.Map; import java.io.IOException; /** + * A legacy numeric field type that encodes "Integer" values as simple Strings. + * This class should not be used except by people with existing indexes that + * contain numeric values indexed as Strings. + * New schemas should use {@link TrieIntField}. * + *+ * Field values will sort numerically, but Range Queries (and other features + * that rely on numeric ranges) will not work as expected: values will be + * evaluated in unicode String order, not numeric order. + *
+ * + * @see TrieIntField */ public class IntField extends FieldType { @Override diff --git a/solr/core/src/java/org/apache/solr/schema/LongField.java b/solr/core/src/java/org/apache/solr/schema/LongField.java index 7c8e066ac45..a8fe83b715e 100644 --- a/solr/core/src/java/org/apache/solr/schema/LongField.java +++ b/solr/core/src/java/org/apache/solr/schema/LongField.java @@ -27,7 +27,18 @@ import org.apache.solr.search.QParser; import java.io.IOException; import java.util.Map; /** + * A legacy numeric field type that encodes "Long" values as simple Strings. + * This class should not be used except by people with existing indexes that + * contain numeric values indexed as Strings. + * New schemas should use {@link TrieLongField}. * + *+ * Field values will sort numerically, but Range Queries (and other features + * that rely on numeric ranges) will not work as expected: values will be + * evaluated in unicode String order, not numeric order. + *
+ * + * @see TrieLongField */ public class LongField extends FieldType { @Override diff --git a/solr/core/src/java/org/apache/solr/schema/ShortField.java b/solr/core/src/java/org/apache/solr/schema/ShortField.java index 7520d58d21c..59cab5a3f05 100644 --- a/solr/core/src/java/org/apache/solr/schema/ShortField.java +++ b/solr/core/src/java/org/apache/solr/schema/ShortField.java @@ -29,8 +29,21 @@ import java.util.Map; /** + * A numeric field that can contain 16-bit signed two's complement integer + * values, encoded as simple Strings. * + *+ * Field values will sort numerically, but Range Queries (and other features + * that rely on numeric ranges) will not work as expected: values will be + * evaluated in unicode String order, not numeric order. + *
* + *+ * The naming convention "Sortable" comes from the fact that both the numeric + * values and encoded String representations Sort identically (as opposed to + * a direct String representation where values such as "11" sort before values + * such as "2"). + *
* + * @see TrieDoubleField * @deprecated use {@link DoubleField} or {@link TrieDoubleField} - will be removed in 5.x */ @Deprecated diff --git a/solr/core/src/java/org/apache/solr/schema/SortableFloatField.java b/solr/core/src/java/org/apache/solr/schema/SortableFloatField.java index 1ed0edf5074..11aeb4bbbfe 100644 --- a/solr/core/src/java/org/apache/solr/schema/SortableFloatField.java +++ b/solr/core/src/java/org/apache/solr/schema/SortableFloatField.java @@ -35,9 +35,21 @@ import org.apache.solr.response.TextResponseWriter; import java.util.Map; import java.io.IOException; + /** + * A legacy numeric field type that encodes "Float" values as Strings such + * that Term enumeration order matches the natural numeric order. This class + * should not be used except by people with existing indexes that already + * contain fields of this type. New schemas should use {@link TrieFloatField}. * - * + *+ * The naming convention "Sortable" comes from the fact that both the numeric + * values and encoded String representations Sort identically (as opposed to + * a direct String representation where values such as "11" sort before values + * such as "2"). + *
+ * + * @see TrieFloatField * @deprecated use {@link FloatField} or {@link TrieFloatField} - will be removed in 5.x */ @Deprecated diff --git a/solr/core/src/java/org/apache/solr/schema/SortableIntField.java b/solr/core/src/java/org/apache/solr/schema/SortableIntField.java index 834bd645f47..810e1390168 100644 --- a/solr/core/src/java/org/apache/solr/schema/SortableIntField.java +++ b/solr/core/src/java/org/apache/solr/schema/SortableIntField.java @@ -35,9 +35,21 @@ import org.apache.solr.response.TextResponseWriter; import java.util.Map; import java.io.IOException; + /** + * A legacy numeric field type that encodes "Integer" values as Strings such + * that Term enumeration order matches the natural numeric order. This class + * should not be used except by people with existing indexes that already + * contain fields of this type. New schemas should use {@link TrieIntField}. * + *+ * The naming convention "Sortable" comes from the fact that both the numeric + * values and encoded String representations Sort identically (as opposed to + * a direct String representation where values such as "11" sort before values + * such as "2"). + *
* + * @see TrieIntField * @deprecated use {@link IntField} or {@link TrieIntField} - will be removed in 5.x */ @Deprecated diff --git a/solr/core/src/java/org/apache/solr/schema/SortableLongField.java b/solr/core/src/java/org/apache/solr/schema/SortableLongField.java index 0e0b3a52906..ce5b2cc2475 100644 --- a/solr/core/src/java/org/apache/solr/schema/SortableLongField.java +++ b/solr/core/src/java/org/apache/solr/schema/SortableLongField.java @@ -36,8 +36,19 @@ import org.apache.solr.response.TextResponseWriter; import java.util.Map; import java.io.IOException; /** + * A legacy numeric field type that encodes "Long" values as Strings such + * that Term enumeration order matches the natural numeric order. This class + * should not be used except by people with existing indexes that already + * contain fields of this type. New schemas should use {@link TrieLongField}. * + *+ * The naming convention "Sortable" comes from the fact that both the numeric + * values and encoded String representations Sort identically (as opposed to + * a direct String representation where values such as "11" sort before values + * such as "2"). + *
* + * @see TrieLongField * @deprecated use {@link LongField} or {@link TrieLongField} - will be removed in 5.x */ @Deprecated diff --git a/solr/core/src/java/org/apache/solr/schema/TrieDoubleField.java b/solr/core/src/java/org/apache/solr/schema/TrieDoubleField.java index 3ca211b2168..d5dba1aef14 100755 --- a/solr/core/src/java/org/apache/solr/schema/TrieDoubleField.java +++ b/solr/core/src/java/org/apache/solr/schema/TrieDoubleField.java @@ -17,6 +17,22 @@ package org.apache.solr.schema; +/** + * A numeric field that can contain double-precision 64-bit IEEE 754 floating + * point values. + * + *