Elasticsearch batching fix