![](/img/trans.png)
[英]how to search child documents with the same parent id in Elasticsearch on ver_6.2.4?
[英]In ElasticSearch ver_6.2.4, how large can scroll_size be?
我正在使用update_by_query更新整個索引字段,將來可能會增加30,000,000行,甚至更大,我閱讀了有關此參數的文檔,並且知道它是默認值1K,但是我沒有看到有關此參數的任何文檔。
所以問題是,* scroll_size可以有多大? *更大時會占用更多的記憶嗎? *如果需要更多的記憶,是否還有其他替代品?
我的功能:
POST /myIndex/myType/_update_by_query?conflicts=proceed&scroll_size=20000
json
{
"script": {
"source": "ctx._source['toUserNickname'] = 'test'",
"lang": "painless"
},
"query": {
"bool": {
"must": [
{
"match": {
"toUserId": "111"
}
}
]
}
}
}
沒有最大值-您可以調整各種變量以確保它不會占用過多的內存/時間。
閱讀“分頁”將很有幫助-https: //www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html
另一個類似的問題: elasticsearch的最大滾動時間
替代方法:並行掃描-https: //hackernoon.com/parallel-scan-scroll-an-elasticsearch-index-db02583d10d1
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.