You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ge...@apache.org on 2026/04/06 18:37:24 UTC
(solr) branch branch_10x updated: SOLR-13309: Simplify references numeric-range classes (#4254)
This is an automated email from the ASF dual-hosted git repository.
gerlowskija pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_10x by this push:
new 788f02bc5e9 SOLR-13309: Simplify references numeric-range classes (#4254)
788f02bc5e9 is described below
commit 788f02bc5e915654b54eda117e3aa093c5eac4dc
Author: Jason Gerlowski <ge...@apache.org>
AuthorDate: Mon Apr 6 14:31:14 2026 -0400
SOLR-13309: Simplify references numeric-range classes (#4254)
---
.../org/apache/solr/core/SolrResourceLoader.java | 1 +
.../solr/schema/numericrange/DoubleRangeField.java | 4 +--
.../solr/schema/numericrange/FloatRangeField.java | 4 +--
.../solr/schema/numericrange/IntRangeField.java | 4 +--
.../solr/schema/numericrange/LongRangeField.java | 4 +--
.../solr/collection1/conf/schema-numericrange.xml | 32 +++++++++++-----------
.../pages/field-types-included-with-solr.adoc | 8 +++---
7 files changed, 29 insertions(+), 28 deletions(-)
diff --git a/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java b/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java
index 4d2812ca668..456106d0c87 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java
@@ -90,6 +90,7 @@ public class SolrResourceLoader
"",
"analysis.",
"schema.",
+ "schema.numericrange.",
"handler.",
"handler.tagger.",
"search.",
diff --git a/solr/core/src/java/org/apache/solr/schema/numericrange/DoubleRangeField.java b/solr/core/src/java/org/apache/solr/schema/numericrange/DoubleRangeField.java
index 5f0d17da4bd..c7eaeb5a82b 100644
--- a/solr/core/src/java/org/apache/solr/schema/numericrange/DoubleRangeField.java
+++ b/solr/core/src/java/org/apache/solr/schema/numericrange/DoubleRangeField.java
@@ -51,8 +51,8 @@ import org.apache.solr.search.QParser;
* <h2>Schema Configuration</h2>
*
* <pre>
- * <fieldType name="doublerange" class="org.apache.solr.schema.numericrange.DoubleRangeField" numDimensions="1"/>
- * <fieldType name="doublerange2d" class="org.apache.solr.schema.numericrange.DoubleRangeField" numDimensions="2"/>
+ * <fieldType name="doublerange" class="solr.DoubleRangeField" numDimensions="1"/>
+ * <fieldType name="doublerange2d" class="solr.DoubleRangeField" numDimensions="2"/>
* <field name="price_range" type="doublerange" indexed="true" stored="true"/>
* <field name="my_2d_range" type="doublerange2d" indexed="true" stored="true"/>
* </pre>
diff --git a/solr/core/src/java/org/apache/solr/schema/numericrange/FloatRangeField.java b/solr/core/src/java/org/apache/solr/schema/numericrange/FloatRangeField.java
index 80a685f45ff..0d4e4f31d58 100644
--- a/solr/core/src/java/org/apache/solr/schema/numericrange/FloatRangeField.java
+++ b/solr/core/src/java/org/apache/solr/schema/numericrange/FloatRangeField.java
@@ -51,8 +51,8 @@ import org.apache.solr.search.QParser;
* <h2>Schema Configuration</h2>
*
* <pre>
- * <fieldType name="floatrange" class="org.apache.solr.schema.numericrange.FloatRangeField" numDimensions="1"/>
- * <fieldType name="floatrange2d" class="org.apache.solr.schema.numericrange.FloatRangeField" numDimensions="2"/>
+ * <fieldType name="floatrange" class="solr.FloatRangeField" numDimensions="1"/>
+ * <fieldType name="floatrange2d" class="solr.FloatRangeField" numDimensions="2"/>
* <field name="price_range" type="floatrange" indexed="true" stored="true"/>
* <field name="my_2d_range" type="floatrange2d" indexed="true" stored="true"/>
* </pre>
diff --git a/solr/core/src/java/org/apache/solr/schema/numericrange/IntRangeField.java b/solr/core/src/java/org/apache/solr/schema/numericrange/IntRangeField.java
index 55a966c312f..b8e76d0a680 100644
--- a/solr/core/src/java/org/apache/solr/schema/numericrange/IntRangeField.java
+++ b/solr/core/src/java/org/apache/solr/schema/numericrange/IntRangeField.java
@@ -49,8 +49,8 @@ import org.apache.solr.search.QParser;
* <h2>Schema Configuration</h2>
*
* <pre>
- * <fieldType name="intrange" class="org.apache.solr.schema.numericrange.IntRangeField" numDimensions="1"/>
- * <fieldType name="intrange2d" class="org.apache.solr.schema.numericrange.IntRangeField" numDimensions="2"/>
+ * <fieldType name="intrange" class="solr.IntRangeField" numDimensions="1"/>
+ * <fieldType name="intrange2d" class="solr.IntRangeField" numDimensions="2"/>
* <field name="price_range" type="intrange" indexed="true" stored="true"/>
* <field name="bbox" type="intrange2d" indexed="true" stored="true"/>
* </pre>
diff --git a/solr/core/src/java/org/apache/solr/schema/numericrange/LongRangeField.java b/solr/core/src/java/org/apache/solr/schema/numericrange/LongRangeField.java
index e4eaabb768e..5004f3affb3 100644
--- a/solr/core/src/java/org/apache/solr/schema/numericrange/LongRangeField.java
+++ b/solr/core/src/java/org/apache/solr/schema/numericrange/LongRangeField.java
@@ -50,8 +50,8 @@ import org.apache.solr.search.QParser;
* <h2>Schema Configuration</h2>
*
* <pre>
- * <fieldType name="longrange" class="org.apache.solr.schema.numericrange.LongRangeField" numDimensions="1"/>
- * <fieldType name="longrange2d" class="org.apache.solr.schema.numericrange.LongRangeField" numDimensions="2"/>
+ * <fieldType name="longrange" class="solr.LongRangeField" numDimensions="1"/>
+ * <fieldType name="longrange2d" class="solr.LongRangeField" numDimensions="2"/>
* <field name="long_range" type="longrange" indexed="true" stored="true"/>
* <field name="long_range_2d" type="longrange2d" indexed="true" stored="true"/>
* </pre>
diff --git a/solr/core/src/test-files/solr/collection1/conf/schema-numericrange.xml b/solr/core/src/test-files/solr/collection1/conf/schema-numericrange.xml
index 145de4a46c9..660acc1bfb1 100644
--- a/solr/core/src/test-files/solr/collection1/conf/schema-numericrange.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/schema-numericrange.xml
@@ -25,28 +25,28 @@
<fieldType name="long" class="solr.LongPointField"/>
<!-- IntRangeField types with different dimensions -->
- <fieldType name="intrange" class="solr.numericrange.IntRangeField" numDimensions="1"/>
- <fieldType name="intrange2d" class="solr.numericrange.IntRangeField" numDimensions="2"/>
- <fieldType name="intrange3d" class="solr.numericrange.IntRangeField" numDimensions="3"/>
- <fieldType name="intrange4d" class="solr.numericrange.IntRangeField" numDimensions="4"/>
+ <fieldType name="intrange" class="solr.IntRangeField" numDimensions="1"/>
+ <fieldType name="intrange2d" class="solr.IntRangeField" numDimensions="2"/>
+ <fieldType name="intrange3d" class="solr.IntRangeField" numDimensions="3"/>
+ <fieldType name="intrange4d" class="solr.IntRangeField" numDimensions="4"/>
<!-- LongRangeField types with different dimensions -->
- <fieldType name="longrange" class="solr.numericrange.LongRangeField" numDimensions="1"/>
- <fieldType name="longrange2d" class="solr.numericrange.LongRangeField" numDimensions="2"/>
- <fieldType name="longrange3d" class="solr.numericrange.LongRangeField" numDimensions="3"/>
- <fieldType name="longrange4d" class="solr.numericrange.LongRangeField" numDimensions="4"/>
+ <fieldType name="longrange" class="solr.LongRangeField" numDimensions="1"/>
+ <fieldType name="longrange2d" class="solr.LongRangeField" numDimensions="2"/>
+ <fieldType name="longrange3d" class="solr.LongRangeField" numDimensions="3"/>
+ <fieldType name="longrange4d" class="solr.LongRangeField" numDimensions="4"/>
<!-- FloatRangeField types with different dimensions -->
- <fieldType name="floatrange" class="solr.numericrange.FloatRangeField" numDimensions="1"/>
- <fieldType name="floatrange2d" class="solr.numericrange.FloatRangeField" numDimensions="2"/>
- <fieldType name="floatrange3d" class="solr.numericrange.FloatRangeField" numDimensions="3"/>
- <fieldType name="floatrange4d" class="solr.numericrange.FloatRangeField" numDimensions="4"/>
+ <fieldType name="floatrange" class="solr.FloatRangeField" numDimensions="1"/>
+ <fieldType name="floatrange2d" class="solr.FloatRangeField" numDimensions="2"/>
+ <fieldType name="floatrange3d" class="solr.FloatRangeField" numDimensions="3"/>
+ <fieldType name="floatrange4d" class="solr.FloatRangeField" numDimensions="4"/>
<!-- DoubleRangeField types with different dimensions -->
- <fieldType name="doublerange" class="solr.numericrange.DoubleRangeField" numDimensions="1"/>
- <fieldType name="doublerange2d" class="solr.numericrange.DoubleRangeField" numDimensions="2"/>
- <fieldType name="doublerange3d" class="solr.numericrange.DoubleRangeField" numDimensions="3"/>
- <fieldType name="doublerange4d" class="solr.numericrange.DoubleRangeField" numDimensions="4"/>
+ <fieldType name="doublerange" class="solr.DoubleRangeField" numDimensions="1"/>
+ <fieldType name="doublerange2d" class="solr.DoubleRangeField" numDimensions="2"/>
+ <fieldType name="doublerange3d" class="solr.DoubleRangeField" numDimensions="3"/>
+ <fieldType name="doublerange4d" class="solr.DoubleRangeField" numDimensions="4"/>
<!-- Field definitions -->
<field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false"/>
diff --git a/solr/solr-ref-guide/modules/indexing-guide/pages/field-types-included-with-solr.adoc b/solr/solr-ref-guide/modules/indexing-guide/pages/field-types-included-with-solr.adoc
index c7124e6c816..7a9508e083f 100644
--- a/solr/solr-ref-guide/modules/indexing-guide/pages/field-types-included-with-solr.adoc
+++ b/solr/solr-ref-guide/modules/indexing-guide/pages/field-types-included-with-solr.adoc
@@ -51,17 +51,17 @@ The {solr-javadocs}/core/org/apache/solr/schema/package-summary.html[`org.apache
|IntPointField |Integer field (32-bit signed integer). This class encodes int values using a "Dimensional Points" based data structure that allows for very efficient searches for specific values, or ranges of values. For single valued fields, `docValues="true"` must be used to enable sorting.
-|IntRangeField |Stores single or multi-dimensional ranges, using syntax like `[1 TO 4]` or `[1,2 TO 3,4]`. Up to 4 dimensions are supported. Dimensionality is specified on new field-types using a `numDimensions` property, and all values for a particular field must have exactly this number of dimensions. Field type is defined in the `org.apache.solr.schema.numericrange` package; fieldType definitions typically reference this as: `<fieldType name="intrange1D" class="solr.numericrange.Int [...]
+|IntRangeField |Stores single or multi-dimensional ranges, using syntax like `[1 TO 4]` or `[1,2 TO 3,4]`. Up to 4 dimensions are supported. Dimensionality is specified on new field-types using a `numDimensions` property, and all values for a particular field must have exactly this number of dimensions. Field type does not support docValues. Typically queried using the xref:query-guide:other-parsers.adoc#numeric-range-query-parser[Numeric Range Query Parser], though the Lucene and othe [...]
|LatLonPointSpatialField |A latitude/longitude coordinate pair; possibly multi-valued for multiple points. Usually it's specified as "lat,lon" order with a comma. See the section xref:query-guide:spatial-search.adoc[] for more information.
|LongPointField |Long field (64-bit signed integer). This class encodes foo values using a "Dimensional Points" based data structure that allows for very efficient searches for specific values, or ranges of values. For single valued fields, `docValues="true"` must be used to enable sorting.
-|LongRangeField |Stores single or multi-dimensional ranges of long integers, using syntax like `[1000000000 TO 4000000000]` or `[1,2 TO 3,4]`. Up to 4 dimensions are supported. Dimensionality is specified on new field-types using a `numDimensions` property, and all values for a particular field must have exactly this number of dimensions. Field type is defined in the `org.apache.solr.schema.numericrange` package; fieldType definitions typically reference this as: `<fieldType name="long [...]
+|LongRangeField |Stores single or multi-dimensional ranges of long integers, using syntax like `[1000000000 TO 4000000000]` or `[1,2 TO 3,4]`. Up to 4 dimensions are supported. Dimensionality is specified on new field-types using a `numDimensions` property, and all values for a particular field must have exactly this number of dimensions. Field type does not support docValues. Typically queried using the xref:query-guide:other-parsers.adoc#numeric-range-query-parser[Numeric Range Query [...]
-|DoubleRangeField |Stores single or multi-dimensional ranges of double-precision floating-point numbers, using syntax like `[1.5 TO 2.5]` or `[1.0,2.0 TO 3.0,4.0]`. Up to 4 dimensions are supported. Dimensionality is specified on new field-types using a `numDimensions` property, and all values for a particular field must have exactly this number of dimensions. Field type is defined in the `org.apache.solr.schema.numericrange` package; fieldType definitions typically reference this as: [...]
+|DoubleRangeField |Stores single or multi-dimensional ranges of double-precision floating-point numbers, using syntax like `[1.5 TO 2.5]` or `[1.0,2.0 TO 3.0,4.0]`. Up to 4 dimensions are supported. Dimensionality is specified on new field-types using a `numDimensions` property, and all values for a particular field must have exactly this number of dimensions. Field type does not support docValues. Typically queried using the xref:query-guide:other-parsers.adoc#numeric-range-query-pars [...]
-|FloatRangeField |Stores single or multi-dimensional ranges of floating-point numbers, using syntax like `[1.5 TO 4.5]` or `[1.0,2.0 TO 3.0,4.0]`. Up to 4 dimensions are supported. Dimensionality is specified on new field-types using a `numDimensions` property, and all values for a particular field must have exactly this number of dimensions. Field type is defined in the `org.apache.solr.schema.numericrange` package; fieldType definitions typically reference this as: `<fieldType name=" [...]
+|FloatRangeField |Stores single or multi-dimensional ranges of floating-point numbers, using syntax like `[1.5 TO 4.5]` or `[1.0,2.0 TO 3.0,4.0]`. Up to 4 dimensions are supported. Dimensionality is specified on new field-types using a `numDimensions` property, and all values for a particular field must have exactly this number of dimensions. Field type does not support docValues. Typically queried using the xref:query-guide:other-parsers.adoc#numeric-range-query-parser[Numeric Range Q [...]
|NestPathField | Specialized field type storing enhanced information, when xref:indexing-nested-documents.adoc#schema-configuration[working with nested documents].