Description
Three issues exist if one creates a SelectStream with an expression.
select( search(collection1, fl="personId_i,rating_f", q="rating_f:*", sort="personId_i asc"), personId_i as personId, rating_f as rating )
"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.
3. Also, if one were to quote the selected fields such as in
select( search(collection1, fl="personId_i,rating_f", q="rating_f:*", sort="personId_i asc"), "personId_i as personId", "rating_f as rating" )
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.