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

   Allow Users to specify text search options in text search query
   
   ### ๐Ÿ“‹ Summary
   This PR introduces a new feature that allows users to specify dynamic query 
options directly in text search queries using the `__OPTIONS` syntax. This 
provides runtime flexibility for Lucene query parsing without requiring table 
configuration changes.
   
   ### โœจ Features
   - **Dynamic Query Options**: Users can now specify Lucene query parser 
options directly in search strings
   - **Multiple Parser Support**: Supports CLASSIC, STANDARD, and COMPLEX 
Lucene query parsers
   - **Runtime Configuration**: No need to modify table configs or restart 
services
   - **Backward Compatibility**: Existing queries continue to work without 
changes
   
   ### ๐Ÿ”ง Implementation Details
   - Added `__OPTIONS(parser=CLASSIC, allowLeadingWildcard=true, 
DefaultOperator=AND)` syntax support
   - Implemented dynamic parser instantiation using reflection
   - Added comprehensive option parsing and validation
   - Enhanced `LuceneTextIndexReader` to handle runtime query options
   - Added extensive test coverage for various option combinations
   
   ### Usage Examples
   ```sql
   -- Use CLASSIC parser with leading wildcard support
   SELECT * FROM table WHERE TEXT_MATCH(column, '*search* 
__OPTIONS(parser=CLASSIC, allowLeadingWildcard=true)')
   
   -- Use STANDARD parser with AND operator
   SELECT * FROM table WHERE TEXT_MATCH(column, 'term1 term2 
__OPTIONS(parser=STANDARD, DefaultOperator=AND)')
   
   -- Use COMPLEX parser for complex phrase queries
   SELECT * FROM table WHERE TEXT_MATCH(column, 'complex query 
__OPTIONS(parser=COMPLEX)')
   ```
   
   ### ๐Ÿงช Testing
   - โœ… Added comprehensive unit tests for option parsing
   - โœ… Added integration tests for different parser types
   - โœ… Added tests for option merging and validation
   - โœ… Added tests for backward compatibility
   - โœ… All existing tests pass
   
   ### ๐Ÿ”„ Backward Compatibility
   - โœ… All existing text search queries continue to work
   - โœ… No changes required to existing table configurations
   - โœ… Default behavior remains unchanged
   


-- 
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: commits-unsubscr...@pinot.apache.org

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


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

Reply via email to