fix elasticsearch client call