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

   This PR introduces a new PrefixPhraseQueryParser that extends Lucene's 
QueryParserBase to support prefix phrase queries with configurable slop and 
inOrder parameters.
   
   > match_phrase query matches documents that contain the exact phrase in the 
specified order.
   > match_phrase_prefix query is like match_phrase but allows the last term to 
be a prefix (with wildcard).
   > 
   
   **Key Changes**
   - Custom PrefixPhraseQueryParser Parser to match match_phrase and 
match_phrase_prefix behavior mentioned above. 
   - Supports both single-term and multi-term queries.
   - Configurable **enablePrefixMatch, slop, and inOrder** parameters. 
   - **Prefix Phrase Matching:** All terms except the last are exact matches, 
last term can have wildcard suffix
   - **Configurable Slop:** Controls distance between terms in phrase queries 
(default: 0)
   - **Configurable InOrder**: Controls whether terms must appear in specified 
order (default: true)
   
   **Sample Queries:**
   
   > -- Basic prefix phrase query
   > SELECT * FROM table WHERE TEXT_MATCH(column, 'java realtime streaming', 
'parser=PREFIX,enablePrefixMatch=true')
   > 
   > -- With custom slop and inOrder
   > SELECT * FROM table WHERE TEXT_MATCH(column, 'java realtime streaming', 
'parser=PREFIX,enablePrefixMatch=true,slop=2,inOrder=false')
   
   
   **Tests Added**
   
   - Unit Tests added in LuceneTextIndexUtilsTest:
   - Integration Tests added in TextSearchQueriesTest:
   
   **Backward Compatibility**
   
   - No Breaking Changes
   - Maintains existing parser behavior for CLASSIC, STANDARD, and COMPLEX 
parsers
   - PREFIX parser is opt-in via parser=PREFIX option


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