JoeHF commented on code in PR #1003: URL: https://github.com/apache/lucene/pull/1003#discussion_r921034917
########## 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: do you mean fields can appear at the sequence like `field1`, `field2` `field1`, according to current approach, when we decompressed `field2`, we returned `STOP` and then lose the second `field1` value? If so, could you give me some hints on how to do early return? -- 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