From 71310a4722f3e95a0e10a4ca4297d090ace3efd4 Mon Sep 17 00:00:00 2001 From: Joel Bernstein Date: Thu, 9 Aug 2018 19:57:24 -0400 Subject: [PATCH] SOLR-11585: Solr SQL does not work with point numeric fields --- .../apache/solr/handler/sql/SolrSchema.java | 4 + .../solr/collection1/conf/schema-sql.xml | 27 ++ .../apache/solr/handler/TestSQLHandler.java | 243 ++++++++++++++++-- 3 files changed, 246 insertions(+), 28 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/handler/sql/SolrSchema.java b/solr/core/src/java/org/apache/solr/handler/sql/SolrSchema.java index f7318cfabf3..c4ef72ca1c9 100644 --- a/solr/core/src/java/org/apache/solr/handler/sql/SolrSchema.java +++ b/solr/core/src/java/org/apache/solr/handler/sql/SolrSchema.java @@ -108,12 +108,16 @@ class SolrSchema extends AbstractSchema { case "tlong": case "int": case "long": + case "pint": + case "plong": type = typeFactory.createJavaType(Long.class); break; case "tfloat": case "tdouble": case "float": case "double": + case "pfloat": + case "pdouble": type = typeFactory.createJavaType(Double.class); break; default: diff --git a/solr/core/src/test-files/solr/collection1/conf/schema-sql.xml b/solr/core/src/test-files/solr/collection1/conf/schema-sql.xml index 430d9663c0b..40bbe5adb95 100644 --- a/solr/core/src/test-files/solr/collection1/conf/schema-sql.xml +++ b/solr/core/src/test-files/solr/collection1/conf/schema-sql.xml @@ -52,6 +52,14 @@ + + + + + + + + + + + + + + + + + + + + + + + + +