This is an automated email from the ASF dual-hosted git repository. ishan pushed a commit to branch ishan/upgrade-to-lucene-10 in repository https://gitbox.apache.org/repos/asf/solr.git
commit 5a0e7f47504fa1409245d869bd8a749a1bb6adf3 Author: Ishan Chattopadhyaya <[email protected]> AuthorDate: Wed Aug 6 15:39:07 2025 +0530 SOLR-17631: Fixing ords handling in DocValuesFacets, fixes TestRandomDVFaceting --- .../core/src/java/org/apache/solr/request/DocValuesFacets.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/request/DocValuesFacets.java b/solr/core/src/java/org/apache/solr/request/DocValuesFacets.java index 0638bb34864..5b66da544fe 100644 --- a/solr/core/src/java/org/apache/solr/request/DocValuesFacets.java +++ b/solr/core/src/java/org/apache/solr/request/DocValuesFacets.java @@ -429,9 +429,8 @@ public class DocValuesFacets { } while ((term = (int) si.nextOrd()) >= 0);*/ for (int o = 0; o < si.docValueCount(); o++) { long ord = si.nextOrd(); - if (ord == DocIdSetIterator.NO_MORE_DOCS) - break; // nocommit this shouldn't have been needed, but without this the - // TestRandomDVFaceting is failing. Why? + if (ord == -1) // NO_MORE_ORDS + break; int term = (int) ord; if (map != null) { term = (int) ordMap.get(term); @@ -465,9 +464,8 @@ public class DocValuesFacets { if (si.advanceExact(doc)) { for (int o = 0; o < si.docValueCount(); o++) { long ord = si.nextOrd(); - if (ord == DocIdSetIterator.NO_MORE_DOCS) - break; // nocommit this shouldn't have been needed, but without this the - // TestRandomDVFaceting is failing. Why? + if (ord == -1) // NO_MORE_ORDS + break; int term = (int) ord; segCounts[1 + term]++; }
