remove the dependency on elasticsearch client