Dennis Gove created SOLR-8485:
---------------------------------
Summary: SelectStream only works with all lowercase field names
and doesn't handle quoted selected fields
Key: SOLR-8485
URL: https://issues.apache.org/jira/browse/SOLR-8485
Project: Solr
Issue Type: Bug
Reporter: Dennis Gove
Priority: Minor
Three issues exist if one creates a SelectStream with an expression.
{code}
select(
search(collection1, fl="personId_i,rating_f", q="rating_f:*",
sort="personId_i asc"),
personId_i as personId,
rating_f as rating
)
{code}
"personId_i as personId" will be parsed as "personid_i as personid"
1. The incoming tuple will contain a field "personId_i" but the selection will
be looking for a field "personid_i". This field won't be found in the incoming
tuple (notice the case difference) and as such no field personId will exist in
the outgoing tuple.
2. If (1) wasn't an issue, the outgoing tuple would have in a field "personid"
and not the expected "personId" (notice the case difference). This can lead to
other down-the-road issues.
Also, if one were to quote the selected fields such as in
{code}
select(
search(collection1, fl="personId_i,rating_f", q="rating_f:*",
sort="personId_i asc"),
"personId_i as personId",
"rating_f as rating"
)
{code}
then the quotes would be included in the field name. Wrapping quotes should be
handled properly such that they are removed from the parameters before they are
parsed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]