LuXugang commented on code in PR #967:
URL: https://github.com/apache/lucene/pull/967#discussion_r907329493


##########
lucene/core/src/java/org/apache/lucene/index/SortedSetDocValuesWriter.java:
##########
@@ -382,23 +386,20 @@ public int advance(int target) {
     public boolean advanceExact(int target) throws IOException {
       // needed in IndexSorter#StringSorter
       docID = target;
+      initCount();
       ordUpto = ords.offsets[docID] - 1;
       return ords.offsets[docID] > 0;
     }
 
     @Override
     public long nextOrd() {
-      long ord = ords.ords.get(ordUpto++);
-      if (ord == 0) {
-        return NO_MORE_ORDS;
-      } else {
-        return ord - 1;
-      }
+      return ords.ords.get(ordUpto++);

Review Comment:
   @jpountz  I revert part code to old ord iteration style so that the changes 
in 
https://github.com/apache/lucene/pull/967/commits/8ccc59812e12386dd684e5a0b85a78a0495fcb11
 could be verified, so we could focus on fixing bug first.



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