You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/11/10 02:35:55 UTC

[GitHub] [incubator-pinot] siddharthteotia opened a new pull request #6251: Make default operator for multi-term and phrase text

siddharthteotia opened a new pull request #6251:
URL: https://github.com/apache/incubator-pinot/pull/6251


   Multi term or phrase queries for text index like the following use implicit OR operator (Lucene default)
   
   - WHERE text_match(col, 't1 t2 \"p1\" \"p2\") is equivalent to WHERE text_match(col, 't1 OR t2 OR \"p1\" OR  \"p2\")
   
   Minor enhancement - We need to make the default operator (OR) configurable on a per text index basis. This was recently discovered as our internal users ramp this feature. 


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] jackjlli commented on a change in pull request #6251: Make default operator for multi-term and phrase text search queries configurable

Posted by GitBox <gi...@apache.org>.
jackjlli commented on a change in pull request #6251:
URL: https://github.com/apache/incubator-pinot/pull/6251#discussion_r520251543



##########
File path: pinot-core/src/test/java/org/apache/pinot/queries/TextSearchQueriesTest.java
##########
@@ -569,10 +591,16 @@ public void testTextSearch() throws Exception {
 
     query = "SELECT INT_COL, SKILLS_TEXT_COL FROM MyTable WHERE TEXT_MATCH(SKILLS_TEXT_COL, '\"distributed systems\" Java C++') LIMIT 50000";
     testTextSearchSelectQueryHelper(query, expected.size(), false, expected);
-
     query = "SELECT COUNT(*) FROM MyTable WHERE TEXT_MATCH(SKILLS_TEXT_COL, '\"distributed systems\" Java C++') LIMIT 50000";
     testTextSearchAggregationQueryHelper(query, expected.size());
 
+    // test for the index configured to use AND as the default
+    // conjunction operator
+    query = "SELECT INT_COL, SKILLS_TEXT_COL FROM MyTable WHERE TEXT_MATCH(SKILLS_TEXT_COL_1, '\"distributed systems\" OR Java OR C++') LIMIT 50000";

Review comment:
       Could you add some tests which uses OR operator? If there is some cases like that, can we add some comments on that and mention the test with `AND` in this test class?




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] siddharthteotia commented on a change in pull request #6251: Make default operator for multi-term and phrase text search queries configurable

Posted by GitBox <gi...@apache.org>.
siddharthteotia commented on a change in pull request #6251:
URL: https://github.com/apache/incubator-pinot/pull/6251#discussion_r520252575



##########
File path: pinot-core/src/test/java/org/apache/pinot/queries/TextSearchQueriesTest.java
##########
@@ -569,10 +591,16 @@ public void testTextSearch() throws Exception {
 
     query = "SELECT INT_COL, SKILLS_TEXT_COL FROM MyTable WHERE TEXT_MATCH(SKILLS_TEXT_COL, '\"distributed systems\" Java C++') LIMIT 50000";
     testTextSearchSelectQueryHelper(query, expected.size(), false, expected);
-
     query = "SELECT COUNT(*) FROM MyTable WHERE TEXT_MATCH(SKILLS_TEXT_COL, '\"distributed systems\" Java C++') LIMIT 50000";
     testTextSearchAggregationQueryHelper(query, expected.size());
 
+    // test for the index configured to use AND as the default
+    // conjunction operator
+    query = "SELECT INT_COL, SKILLS_TEXT_COL FROM MyTable WHERE TEXT_MATCH(SKILLS_TEXT_COL_1, '\"distributed systems\" OR Java OR C++') LIMIT 50000";

Review comment:
       There are plenty of existing tests that use both and (explicitly) and or (both implicitly and explicitly).
   
   In addition, I have added new tests to test the behavior when the config is set to true. In this case also, I have added tests for both and and or implicitly and explicitly




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] siddharthteotia merged pull request #6251: Make default operator for multi-term and phrase text search queries configurable

Posted by GitBox <gi...@apache.org>.
siddharthteotia merged pull request #6251:
URL: https://github.com/apache/incubator-pinot/pull/6251


   


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] siddharthteotia commented on pull request #6251: Make default operator for multi-term and phrase text search queries configurable

Posted by GitBox <gi...@apache.org>.
siddharthteotia commented on pull request #6251:
URL: https://github.com/apache/incubator-pinot/pull/6251#issuecomment-724415637


   > Do we have a place to specify all the default behaviors for text search?
   
   Yes everything is there in FieldConfig


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org