Limit scroll result set by size in bytes instead of documents?

Sure, you could write an alternative implementation
of org.elasticsearch.search.fetch.FetchSearchResult
that stops fetching search results if they exceed a limit.
Because ES shards do not know about the byte size of the final result the
client sees, you would have to declare an internal estimated byte limit per
shard.
There is an edge case where bytes instead of docs doesn't help much, since
even a single doc could take gigabytes.
All in all, I am not sure how much the benefit is, compared to a
scan/scroll over huge docs with setting the scroll size to the minimum of 1.

Jörg

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoF_RmKqxW9vkcX7PS8c889iTif2KfZkaNBpUZvKYTuJiA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.