msfroh commented on PR #15718: URL: https://github.com/apache/lucene/pull/15718#issuecomment-3924022710
I'm wondering if you could just skip the `flush` logic altogether if there are no stored fields in the segment? Then you might be able to avoid the `startDocument()` and `finishDocument()` calls for each doc. Though looking at the behavior in `IndexingChain` that always calls `startStoredFields`, and the logic [in StoredFieldsConsumer](https://github.com/apache/lucene/blob/f12e44b6515a25933dc5e9316df72d8b093eae12/lucene/core/src/java/org/apache/lucene/index/StoredFieldsConsumer.java#L59), it looks like we **do** require that `startDocument()` and `finishDocument()` get called for each doc. That's a bummer. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
