minor refactoring of Elasticsearch client