jpountz commented on code in PR #1003:
URL: https://github.com/apache/lucene/pull/1003#discussion_r918758391


##########
lucene/core/src/java/org/apache/lucene/codecs/compressing/Decompressor.java:
##########
@@ -42,6 +44,13 @@ protected Decompressor() {}
   public abstract void decompress(
       DataInput in, int originalLength, int offset, int length, BytesRef 
bytes) throws IOException;
 
+  public InputStream decompress(DataInput in, int originalLength, int offset, 
int length)

Review Comment:
   Maybe it would help to make it a `DataInput` and use `ByteArrayDataInput`.



##########
lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java:
##########
@@ -98,6 +100,16 @@ public void doubleField(FieldInfo fieldInfo, double value) {
 
   @Override
   public Status needsField(FieldInfo fieldInfo) throws IOException {
+    // return stop after collected all needed fields
+    if (fieldsToAdd != null
+        && !fieldsToAdd.contains(fieldInfo.name)
+        && fieldsToAdd.size()
+            == doc.getFields().stream()
+                .map(IndexableField::name)
+                .collect(Collectors.toSet())
+                .size()) {
+      return Status.STOP;

Review Comment:
   This isn't correct, some fields could have multiple values?



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