扫描和滚动不起作用从外部放置ElasticSearch群集的Docker

目前我使用Docker和ElasticSearch集群,它位于容器外部。 从我的docker我pipe理创build一个映射(所以我的IP很好),我设法启动简单的请求在Python语言。

def getBodyOfRoot(self, id): res = self.es.get(index=self.ES_Index, doc_type=self.ES_Type, id=id) return res['_source'] 

这个例子在我的主机和Docker中运行良好。

但是当我从Docker启动我的扫描和滚动时,我没有得到回应,但是从我的本地操作系统,我得到一个响应。

如果你已经遇到这个问题,你是如何解决这个问题的?

提前致谢。

尝试发出扫描,并使用cURL从您的Docker容器滚动:

 curl -XGET http://elastic-search-host:9200/my_index/_search?scroll=1m&search_type=scan&size=10 -d ' { "query": { "match" : { "title" : "elasticsearch" } } } '