This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 4cfe509549d Allow setting wildcard and useAND default operator for all 
query parser types. (#16131)
4cfe509549d is described below

commit 4cfe509549deddf565cb4b8fcdd9a8dbbe5c4c17
Author: RAGHVENDRA KUMAR YADAV <raghavmn...@gmail.com>
AuthorDate: Tue Jun 17 15:42:41 2025 -0700

    Allow setting wildcard and useAND default operator for all query parser 
types. (#16131)
---
 .../local/segment/index/readers/text/LuceneTextIndexReader.java      | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/readers/text/LuceneTextIndexReader.java
 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/readers/text/LuceneTextIndexReader.java
index 678cdfac01b..7cf745e5afb 100644
--- 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/readers/text/LuceneTextIndexReader.java
+++ 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/readers/text/LuceneTextIndexReader.java
@@ -168,11 +168,10 @@ public class LuceneTextIndexReader implements 
TextIndexReader {
       QueryParserBase parser = 
_queryParserClassConstructor.newInstance(_column, _analyzer);
       // Phrase search with prefix/suffix matching may have leading *. E.g., 
`*pache pinot` which can be stripped by
       // the query parser. To support the feature, we need to explicitly set 
the config to be true.
-      if 
(_queryParserClass.equals("org.apache.lucene.queryparser.classic.QueryParser")
-              && _enablePrefixSuffixMatchingInPhraseQueries) {
+      if (_enablePrefixSuffixMatchingInPhraseQueries) {
         parser.setAllowLeadingWildcard(true);
       }
-      if 
(_queryParserClass.equals("org.apache.lucene.queryparser.classic.QueryParser") 
&& _useANDForMultiTermQueries) {
+      if (_useANDForMultiTermQueries) {
         parser.setDefaultOperator(QueryParser.Operator.AND);
       }
       Query query = parser.parse(searchQuery);


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

Reply via email to