Is it possible to configure Elasticsearch so that it returns different fields for different documents, based on some criteria?
For example: if a field called "foo" >= 40, then return all fields. If not, return all fields except field "bar"?
The context for this is following: I am reindexing data from an ES 1.7 index into ES 5.6. Due to a bug, ES 1.7 contains documents which are huge (several hundreds of MBs). Because of that, ES 5.6 cannot get done with reindexing, since its internal buffer is limited to "only" 200 MB and is not configurable.
While I could do what Nik proposed in a comment on Github, i.e. reindexing in 2 passes, I wonder if there is an easier way to do that. If I could simply omit the huge fields from the source, that would simplify reindexing significantly.
Thanks in advance!