Added code to update ElasticSearch for PUT/PATCH and POST commands