script to index data in ElasticSearch