Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
Description
I have a simple "stats" query (from SolrTable) that requests the min / max of an integer field, but that field is declared in the schema using a custom field type, such as:
<fieldType name="integer" class="solr.TrieIntField" .../> <field name="myIntField" type="integer" .../>
The switch at https://github.com/apache/solr/blob/main/solr/core/src/java/org/apache/solr/handler/sql/SolrSchema.java#L144 causes the "type" for this field to be String which results in some weird output for this query:
SELECT min(myIntField), max(myIntField) from table
Results:
{ "result-set":{ "docs":[{ "EXPR$0":"2.0210507E7", "EXPR$1":"2.0210605E7"} ,{ "EOF":true, "RESPONSE_TIME":8846}]}}
Since we're querying /luke already to get schema info, we might as well use the field type info vs. defaulting to String