JoeHF commented on code in PR #1003: URL: https://github.com/apache/lucene/pull/1003#discussion_r926864645
########## 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: removed this in https://github.com/apache/lucene/pull/1003/commits/4b9086fc1bbb31f0ca36986f3adaa770665215e1 found other way to optimize -- 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