简体   繁体   English

如何加快Elasticsearch重新索引操作?

[英]How to speed up Elasticsearch reindex operation?

我们是否可以通过将副本设置为零并增加刷新间隔来加快Elasticsearch(v 5.3)的重新索引操作,还是在内部进行了处理?

In order to improve indexing speed you can use the following: 为了提高索引编制速度,您可以使用以下方法:

  • Use bulk requests 使用批量请求
  • Use multiple workers/threads to send data to Elasticsearch 使用多个工作程序/线程将数据发送到Elasticsearch
  • Increase the refresh interval 增加刷新间隔
  • Disable refresh and replicas for initial loads 禁用刷新和副本以进行初始加载
  • Use auto-generated ids 使用自动生成的ID
  • Increase indexing buffer size 增加索引缓冲区大小

Related to you question - ElasticSearch is designed for continuous log processing that's why all these actions are not automatic. 与您相关的问题-ElasticSearch专为连续日志处理而设计,这就是为什么所有这些操作都不是自动的。 In case of bulk reindexings you have to change all these settings manually and restore them at the end: 如果进行批量重新索引编制,则必须手动更改所有这些设置,并在最后恢复它们:

  • refresh interval for Lucene index writer Lucene索引编写器的刷新间隔
  • replication factor for distributed processor 分布式处理器的复制因子
  • index buffer size for merge scheduler 合并调度程序的索引缓冲区大小

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

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