You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Timothy Potter (Jira)" <ji...@apache.org> on 2022/03/03 01:41:00 UTC

[jira] [Resolved] (SOLR-16009) Solr SQL does not return documents for 'AND' operation on multi-valued field

     [ https://issues.apache.org/jira/browse/SOLR-16009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Potter resolved SOLR-16009.
-----------------------------------
    Fix Version/s: 9.0
                   8.11.2
       Resolution: Fixed

> Solr SQL does not return documents for 'AND' operation on multi-valued field
> ----------------------------------------------------------------------------
>
>                 Key: SOLR-16009
>                 URL: https://issues.apache.org/jira/browse/SOLR-16009
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Parallel SQL
>    Affects Versions: 8.11.1
>            Reporter: Kiran
>            Assignee: Timothy Potter
>            Priority: Major
>             Fix For: 9.0, 8.11.2
>
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> SolrSQL fails if `AND` operation is performed on multi-valued field in Solr
> Data
>  
> {code:java}
> [{
>         "name_s":"Foo",
>         "cities_ss":["SFO",
>           "NYC"],
>         "userid_i":1,
>         "id":"1"},
>       {
>         "name_s":"Bar",
>         "cities_ss":["SEA",
>           "LA"],
>         "userid_i":2,
>         "id":"2"}] {code}
> Sql query
>  
> {code:java}
> select name_s, cities_ss FROM sql_test WHERE cities_ss IN ('SFO') AND cities_ss IN ('NYC') {code}
> The above query returns no documents even though a match exists in Solr
> Similar query (below) returns no documents
> {code:java}
> select name_s, cities_ss FROM sql_test WHERE cities_ss='SFO' and cities_ss='NYC' {code}
> 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
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org