added connection code for using elasticsearch instead of couchbase