updated java version to use ElasticSearch(java.lang.AutoCloseable)