Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
4.0-ALPHA
-
None
-
None
-
Using latest from trunk
Description
If you query for a field that has a "-" character in the name, you get odd results. I took the example schema and added a field called "in-stock" to go along with the existing "inStock" field.
A query for http://localhost:8983/solr/select?q=*:*&fl=id,in-stock throws back an error saying the field "in" can't be found.
I can sort of work around it by quoting the field name as "in-stock":
http://localhost:8983/solr/select?q=*:*&fl=id,%22in-stock%22&rows=1
However the output is still off:
<doc>
<str name="id">GB18030TEST</str>
<str name=""in-stock"">in-stock</str>
</doc>
In looking at it, I think the dash character causes the field name to be interpreted as an actual function!
Attachments
Issue Links
- duplicates
-
SOLR-2719 REGRESSION ReturnFields incorrect parse fields with hyphen - breaks existing "fl=my-field-name" type usecases
- Closed