简体   繁体   English

在ElasticSearch ver_6.2.4中,scroll_size可以有多大?

[英]In ElasticSearch ver_6.2.4, how large can scroll_size be?

I'm using update_by_query to update a whole index fields, it may be 30,000,000 rows or even larger in the future, I read the document about this parameter, and I knew it's 1K default, but I didn't see any documents about it. 我正在使用update_by_query更新整个索引字段,将来可能会增加30,000,000行,甚至更大,我阅读了有关此参数的文档,并且知道它是默认值1K,但是我没有看到有关此参数的任何文档。

So the question is, * how large can scroll_size be? 所以问题是,* scroll_size可以有多大? * will it takes more memories when it's larger? *更大时会占用更多的记忆吗? * if it does take more memories, are there any replacements? *如果需要更多的记忆,是否还有其他替代品?

My function: 我的功能:

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"
                    }
                }
            ]
        }
    }
}

There is no max - there are various variables you can adjust to ensure that it doesnt take up too much memory/time. 没有最大值-您可以调整各种变量以确保它不会占用过多的内存/时间。

reading up on "pagination" will be helpful - https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html 阅读“分页”将很有帮助-https: //www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html

Another similar question: Max scrollable time for elasticsearch 另一个类似的问题: elasticsearch的最大滚动时间

Alternative: parallel scanning - https://hackernoon.com/parallel-scan-scroll-an-elasticsearch-index-db02583d10d1 替代方法:并行扫描-https: //hackernoon.com/parallel-scan-scroll-an-elasticsearch-index-db02583d10d1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM