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

Nick Shanin commented on SOLR-3407:
-----------------------------------

>From code reading against apache/main b73f03976fa, a digit-leading token in fl 
>such as 24_7 is parsed as a function, so a constant is returned under the key 
>24 and the field name is split 
>(solr/core/src/java/org/apache/solr/search/SolrReturnFields.java:394-411). Is 
>this still a problem on a current release? If so, a fix in SolrReturnFields 
>would keep the whole token as the field name.

🤖 AI-generated 🤖

> Field names with leading digits cause strange behavior when used with "fl" 
> param
> --------------------------------------------------------------------------------
>
>                 Key: SOLR-3407
>                 URL: https://issues.apache.org/jira/browse/SOLR-3407
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 4.0-ALPHA
>         Environment: apache-solr-4.0-2012-04-24_08-27-47
>            Reporter: Chris Bleakley
>            Priority: Major
>
> When specifying a field name that starts with a digit (or digits) in the "fl" 
> parameter solr returns both the field name and field value as the those 
> digits. For example, using nightly build 
> "apache-solr-4.0-2012-04-24_08-27-47" I run: 
> java -jar start.jar 
> and 
> java -jar post.jar solr.xml monitor.xml 
> If I then add a field to the field list that starts with a digit ( 
> localhost:8983/solr/select?q=*:*&fl=24 ) the results look like: 
> ... 
> <doc>
> <long name="24">24</long>
> </doc>
> ... 
> if I try fl=24_7 it looks like everything after the underscore is truncated 
> ... 
> <doc>
> <long name="24">24</long>
> </doc>
> ... 
> and if I try fl=3test it looks like everything after the last digit is 
> truncated 
> ... 
> <doc>
> <long name="3">3</long>
> </doc>
> ... 
> If I have an actual value for that field (say I've indexed 24_7 to be "true" 
> ) I get back that value as well as the behavior above. 
> ... 
> <doc>
> <bool name="24_7">true</bool>
> <long name="24">24</long>
> </doc>
> ... 



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to