Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
8.11.1
Description
SolrSQL fails if `AND` operation is performed on multi-valued field in Solr
Data
[{ "name_s":"Foo", "cities_ss":["SFO", "NYC"], "userid_i":1, "id":"1"}, { "name_s":"Bar", "cities_ss":["SEA", "LA"], "userid_i":2, "id":"2"}]
Sql query
select name_s, cities_ss FROM sql_test WHERE cities_ss IN ('SFO') AND cities_ss IN ('NYC')
The above query returns no documents even though a match exists in Solr
Similar query (below) returns no documents
select name_s, cities_ss FROM sql_test WHERE cities_ss='SFO' and cities_ss='NYC'
Multi-valued support in SQL is messy but it would be good to get support for this as filtering on multi-valued fields are quite common in Solr
This is probably a bug in Calcite giving precedence to some default rules