gsmiller commented on a change in pull request #443:
URL: https://github.com/apache/lucene/pull/443#discussion_r751467194



##########
File path: 
lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyFacetLabels.java
##########
@@ -168,24 +234,61 @@ public FacetLabel nextFacetLabel(int docId, String 
facetDimension) throws IOExce
           throw new IllegalArgumentException(
               "docs out of order: previous docId=" + currentDocId + " current 
docId=" + docId);
         }
-        ordinalsSegmentReader.get(docId, decodedOrds);
-        currentPos = decodedOrds.offset;
         currentDocId = docId;
-      }
 
-      if (parents == null) {
-        parents = taxoReader.getParallelTaxonomyArrays().parents();
+        if (ordinalsSegmentReader != null) {
+          ordinalsSegmentReader.get(docId, decodedOrds);
+          currentPos = decodedOrds.offset;
+        } else {
+          currentDocHasValues = ordinalValues.advanceExact(docId);
+          if (currentDocHasValues) {

Review comment:
       True. I think the calling code would ultimately get the same experience 
though (e.g., `null` return value).




-- 
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

Reply via email to