chenboat commented on code in PR #13003: URL: https://github.com/apache/pinot/pull/13003#discussion_r1681468388
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/invertedindex/RealtimeLuceneTextIndex.java: ########## @@ -181,6 +194,27 @@ private MutableRoaringBitmap getPinotDocIds(IndexSearcher indexSearcher, Mutable return actualDocIDs; } + private Constructor<QueryParserBase> getQueryParserWithStringAndAnalyzerTypeConstructor(String queryParserClassName) + throws ReflectiveOperationException { + // Fail-fast if the query parser is specified class is not QueryParseBase class + final Class<?> queryParserClass = Class.forName(queryParserClassName); + if (!QueryParserBase.class.isAssignableFrom(queryParserClass)) { + throw new ReflectiveOperationException("The specified lucene query parser class " + queryParserClassName + + " is not assignable from " + QueryParserBase.class.getName()); + } + // Fail-fast if the query parser does not have the required constructor used by this class + try { + queryParserClass.getConstructor(String.class, Analyzer.class); + } catch (NoSuchMethodException ex) { + throw new NoSuchMethodException("The specified lucene query parser class " + queryParserClassName + + " is not assignable from does not have the required constructor method with parameter type " Review Comment: please fix typo here? -- 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