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