簡體   English   中英

在外部放置ElasticSearch集群的Docker中,掃描滾動無法使用

[英]scan-and-scroll doesn't work from Docker with a ElasticSearch cluster placed outside

當前,我將Docker與ElasticSearch集群一起使用,該集群位於容器外部。 從我的泊塢窗中,我設法創建了一個映射(因此我的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啟動掃描滾動時,我沒有得到響應,但是從本機OS中得到了響應。

如果您已經遇到了這個問題,那么您如何解決呢?

提前致謝。

嘗試使用cURL發出掃描並從Docker容器滾動:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM