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


##########
lucene/core/src/java/org/apache/lucene/index/SortedSetDocValuesWriter.java:
##########
@@ -415,34 +420,55 @@ public BytesRef lookupOrd(long ord) throws IOException {
     public long getValueCount() {
       return in.getValueCount();
     }
+
+    private void set() {
+      if (set == false) {
+        assert docID >= 0;
+        count = (int) ords.growableWriter.get(docID);
+        set = true;
+      }
+    }
   }
 
   static final class DocOrds {
     final long[] offsets;
     final PackedLongValues ords;
+    final GrowableWriter growableWriter;
+
+    public static final int START_BITS_PER_VALUE = 2;
 
     DocOrds(
         int maxDoc,
         Sorter.DocMap sortMap,
         SortedSetDocValues oldValues,
         float acceptableOverheadRatio)
         throws IOException {
+      this(maxDoc, sortMap, oldValues, acceptableOverheadRatio, 
START_BITS_PER_VALUE);
+    }
+
+    DocOrds(
+        int maxDoc,
+        Sorter.DocMap sortMap,
+        SortedSetDocValues oldValues,
+        float acceptableOverheadRatio,
+        int bitsPerValue)
+        throws IOException {

Review Comment:
   addressed in 
https://github.com/apache/lucene/pull/967/commits/1bfa925e200417e2c8cc35110ccd991177962fb2



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