You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/02/28 06:39:29 UTC

[GitHub] [lucene-solr] kiranchitturi opened a new pull request #2644: SOLR-16009 Add custom udfs for filtering inside multi-valued fields

kiranchitturi opened a new pull request #2644:
URL: https://github.com/apache/lucene-solr/pull/2644


   * Since Solr supports multi-valued fields, it would be crucial for Solr SQL to provide support for users to filter multi-valued fields via SQL
   * Support syntax like `WHERE mv_field = 'a' and mv_field = 'b'` would not make sense using SQL but we can support this via custom udfs
   * Add new udfs `array_contains_all` and `array_contains_any` to filter inside multi-valued fields as this provides a clean interface to use and no need to mess with the calcite rules


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [lucene-solr] thelabdude commented on a change in pull request #2644: SOLR-16009 Add custom udfs for filtering inside multi-valued fields

Posted by GitBox <gi...@apache.org>.
thelabdude commented on a change in pull request #2644:
URL: https://github.com/apache/lucene-solr/pull/2644#discussion_r816037662



##########
File path: solr/core/src/test/org/apache/solr/handler/TestSQLHandler.java
##########
@@ -2388,6 +2388,7 @@ public void testMultiValuedFieldHandling() throws Exception {
     update.add("id", String.valueOf(maxDocs)); // all multi-valued fields are null
     update.commit(cluster.getSolrClient(), COLLECTIONORALIAS);
 
+    expectResults("SELECT stringxmv, stringsx, booleans FROM $ALIAS WHERE stringxmv IN ('a') AND stringxmv IN ('b')", 10);

Review comment:
       how is this working? is calcite just matching all rows here? I thought the bug here was that calcite was erasing the two IN's and then matching none ;-)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [lucene-solr] thelabdude merged pull request #2644: SOLR-16009 Add custom udfs for filtering inside multi-valued fields

Posted by GitBox <gi...@apache.org>.
thelabdude merged pull request #2644:
URL: https://github.com/apache/lucene-solr/pull/2644


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [lucene-solr] kiranchitturi commented on a change in pull request #2644: SOLR-16009 Add custom udfs for filtering inside multi-valued fields

Posted by GitBox <gi...@apache.org>.
kiranchitturi commented on a change in pull request #2644:
URL: https://github.com/apache/lucene-solr/pull/2644#discussion_r816219452



##########
File path: solr/core/src/test/org/apache/solr/handler/TestSQLHandler.java
##########
@@ -2388,6 +2388,7 @@ public void testMultiValuedFieldHandling() throws Exception {
     update.add("id", String.valueOf(maxDocs)); // all multi-valued fields are null
     update.commit(cluster.getSolrClient(), COLLECTIONORALIAS);
 
+    expectResults("SELECT stringxmv, stringsx, booleans FROM $ALIAS WHERE stringxmv IN ('a') AND stringxmv IN ('b')", 10);

Review comment:
       that was a temporary change that got pushed accidentally. the assert actually fails. I have removed it in the next commit




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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