gsmiller commented on a change in pull request #443: URL: https://github.com/apache/lucene/pull/443#discussion_r752335273
########## File path: lucene/facet/src/java/org/apache/lucene/facet/taxonomy/FastTaxonomyFacetCounts.java ########## @@ -69,31 +69,34 @@ public FastTaxonomyFacetCounts( } private final void count(List<MatchingDocs> matchingDocs) throws IOException { + if (matchingDocs.isEmpty()) { + return; + } + + boolean useBinaryDv = FacetUtils.usesOlderBinaryOrdinals(matchingDocs.get(0).context.reader()); + for (MatchingDocs hits : matchingDocs) { - BinaryDocValues dv = hits.context.reader().getBinaryDocValues(indexFieldName); - if (dv == null) { // this reader does not have DocValues for the requested category list + assert useBinaryDv == FacetUtils.usesOlderBinaryOrdinals(hits.context.reader()); Review comment: Hmm, interesting @jpountz. So I think this still works as expected in the case of a `MultiReader`, but do you see any concerns there? In a situation where a `MultiReader` wrapped an 8.x and 9.x index, it seems like the `LeafReader`s will correctly report the 8.x / 9.x versions, and the older format will be retained for the 8.x index and the newer for 9.x. I'm not very familiar with these MultiReader cases though, so I'd like to confirm this understanding. Thanks! -- 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: issues-unsubscr...@lucene.apache.org 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