Timothy Potter created SOLR-15456: ------------------------------------- Summary: Solr SQL metrics for field with custom field type defaults to String instead of using the correct numeric type Key: SOLR-15456 URL: https://issues.apache.org/jira/browse/SOLR-15456 Project: Solr Issue Type: Bug Security Level: Public (Default Security Level. Issues are Public) Components: Parallel SQL Reporter: Timothy Potter Assignee: Timothy Potter
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: {code} <fieldType name="integer" class="solr.TrieIntField" .../> <field name="myIntField" type="integer" .../> {code} 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: {code} SELECT min(myIntField), max(myIntField) from table {code} Results: {code} { "result-set":{ "docs":[{ "EXPR$0":"2.0210507E7", "EXPR$1":"2.0210605E7"} ,{ "EOF":true, "RESPONSE_TIME":8846}]}} {code} Since we're querying {{/luke}} already to get schema info, we might as well use the field type info vs. defaulting to String -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org