chenboat commented on code in PR #13003: URL: https://github.com/apache/pinot/pull/13003#discussion_r1681475462
########## 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: Should we also do this on the non realtime lucene index too? -- 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