elastic search client code