jackluo923 commented on code in PR #13003: URL: https://github.com/apache/pinot/pull/13003#discussion_r1698837052
########## 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); Review Comment: I believe the "non realtime lucene index" code path is in `LuceneTextIndexReader.java` which has the same code added -- 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