I just discovered a strange behavior of the TransportClient in ES 5.6.11. Maybe a bug, maybe just wrong usage. When I store a script via the TransportClient then all fields but the first field get lost in the source. When I store the same script source via REST it works fine.
I prepared a toy example showing it: https://gist.github.com/hkorte/cb20352171702446505d6bee693114a3#file-putstoredscriptexample-java-L24
It starts an ES node in a docker container, stores scripts using transport and REST client and then prints the different results.
Is this a bug or intended behavior?
I know, switching to the REST client would solve the problem. But this is not a trivial task in our production system. Any ideas?