jackluo923 commented on code in PR #13003:
URL: https://github.com/apache/pinot/pull/13003#discussion_r1698831112


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/invertedindex/RealtimeLuceneTextIndex.java:
##########
@@ -122,12 +126,21 @@ public MutableRoaringBitmap getDocIds(String searchQuery) 
{
     Callable<MutableRoaringBitmap> searchCallable = () -> {
       IndexSearcher indexSearcher = null;
       try {
-        QueryParser parser = new QueryParser(_column, _analyzer);
+        // Lucene Query Parser is JavaCC based. It is stateful and should
+        // be instantiated per query. Analyzer on the other hand is stateless
+        // and can be created upfront.
+        QueryParserBase parser = 
_queryParserClassConstructor.newInstance(_column, _analyzer);
         if (_enablePrefixSuffixMatchingInPhraseQueries) {
+          // TODO: this code path is semi-broken as the default QueryParser 
does not always utilizes the analyzer

Review Comment:
   done



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