[ 
https://issues.apache.org/jira/browse/SOLR-15456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17375867#comment-17375867
 ] 

ASF subversion and git services commented on SOLR-15456:
--------------------------------------------------------

Commit b9c2a9e0ff1f8aa9da5641ef72a27c8678f7b513 in lucene-solr's branch 
refs/heads/branch_8x from Timothy Potter
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=b9c2a9e ]

SOLR-15456: Get field type info from luke for custom fields instead of 
defaulting to String in Parallel SQL (#2524)



> 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
>          Components: Parallel SQL
>            Reporter: Timothy Potter
>            Assignee: Timothy Potter
>            Priority: Minor
>              Labels: RobustSQL
>             Fix For: main (9.0)
>
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to