I am looking for a way to use the native elasticsearch client in order to retrieve the source when script fields are used.
Here is a way to do it using JSON/http:
https://stackoverflow.com/a/11856215/536299
I have not been able to find a way to achieve this through the native java client.
Can anyone please help?