gautamworah96 commented on a change in pull request #2247: URL: https://github.com/apache/lucene-solr/pull/2247#discussion_r572444675
########## File path: lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyReader.java ########## @@ -320,18 +322,12 @@ public FacetLabel getPath(int ordinal) throws IOException { // doOpenIfChanged, we need to ensure that the ordinal is one that this DTR // instance recognizes. Therefore we do this check up front, before we hit // the cache. - if (ordinal < 0 || ordinal >= indexReader.maxDoc()) { - return null; - } + int indexReaderMaxDoc = indexReader.maxDoc(); + isOrdinalInIndexReaderRange(ordinal, indexReaderMaxDoc); Review comment: Yep. In fact, we had also created a spinoff [issue](https://issues.apache.org/jira/browse/LUCENE-9460) for addressing this expected behavior change in JIRA last year. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org