Added optional Elasticsearch support