| What I had in mind here is this: ES will return the source document exactly as it has been indexed. This comes into play when projecting the source document (see ProjectionConstants.SOURCE but also when e.g. showing the contents via curl in demos. So it should be possible to pass the source document pretty-printed at indexing time. This would be mainly a debugging option or for demo-ing purposes, most of the time storing the more compact non-pretty-printed form is better. Thinking more about it, for projections we could parse and pretty-print on the querying side ourselves. I still can see value in storing documents pretty-printed, mainly for retrieval via curl (unles there is a way to pretty-print response payload there, too?). |