raghavyadav01 opened a new pull request, #16650:
URL: https://github.com/apache/pinot/pull/16650

   This PR adds a new text search parser that provides 
[OpenSearch-compatible](https://docs.opensearch.org/latest/query-dsl/minimum-should-match/)
  minimum_should_match functionality, allowing users to specify the minimum 
number of terms that must match in Boolean queries. The parser supports both 
simple and deeply nested queries with percentage-based and integer-based 
specifications, enabling more control over text search matching behavior.
   
   Sample Query
   ````
   -- Require 2 out of 4 terms to match
   SELECT * FROM table WHERE TEXT_MATCH(field, 'one OR two OR three OR four', 
     'parser=MINIMUM_SHOULD_MATCH', 'minimumShouldMatch=2')
   
   -- Require 75% of terms to match (3 out of 4)
   SELECT * FROM table WHERE TEXT_MATCH(field, 'one OR two OR three OR four', 
     'parser=MINIMUM_SHOULD_MATCH', 'minimumShouldMatch=75%')
   ````
   
   How minimumShouldMatch Works 
   - Positive Integer (e.g., "3"): At least N should clauses must match
   - Negative Integer (e.g., "-2"): At most N should clauses can be missing
   - Positive Percentage (e.g., "80%"): At least X% of should clauses must match
   - Negative Percentage (e.g., "-20%"): At most X% of should clauses can be 
missing
   
   Test Coverage
   - Added Unit Test.
   - Added Integration test.
   
   Backward Compatibility: N/A
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to