索引刷新间隔在ElasticSearch中如何工作? [英] How does index refresh interval work in ElasticSearch?

查看:1294
本文介绍了索引刷新间隔在ElasticSearch中如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置 index.refresh_interval = -1 ,这意味着indexReader不会被永久刷新,但是为什么我仍然可以在一段时间的索引之后找到一些新的文档?有没有其他参数来控制索引刷新?假设有一个名为 maxDocsRefresh 的参数,这意味着当新文档达到限制时,IndexReader会自动刷新。然而,问题是可能会有一些不可搜索的文档,因为文档的一部分没有达到索引刷新的限制。

解决方案

p> referh_interval 设置提供了几乎实时的搜索能力来弹性搜索。



以下文章提供了一个很好的解释,在刷新时究竟发生了什么,并且刷新 flush



只需将刷新允许在lucene段被刷新/提交之前可以搜索文档磁盘。但是,如果您禁用刷新,最终将在translog达到某个ththold时提交,这将使数据可搜索。



以下文档显示可用于调整刷新设置的参数。


I set index.refresh_interval=-1, that means the indexReader would not be refreshed forever, but why I still could find some new docs after a while of indexing? Is there any other parameter to control the index refresh?

Let's suppose there is a parameter called maxDocsRefresh, that means when the new docs reach a limitation IndexReader would refresh automatically. However, the problem is that there could be some unsearchable docs since part of the docs didn't reach the limitation of index refresh.

解决方案

The refersh_interval setting provides a near real-time search ability to elasticsearch.

The following article provides a great explanation of what exactly occurs during a refresh and the difference between a refresh and flush.

Simply put refresh allows for the documents to be searchable before the lucene segment is flushed/commited to disk. However if you disable refresh it would eventually commit when the translog reaches a certain thresold and this would make the data searchable.

The following documents shows the parameters that can be used to tweak the flush settings.

这篇关于索引刷新间隔在ElasticSearch中如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆