lazily connect to elasticsearch