Updated java code to the last ElasticSearch version