如何禁用弹性搜索中的自动索引创建? [英] How can i disable the automatic index creation in elasticsearch?

查看:328
本文介绍了如何禁用弹性搜索中的自动索引创建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要禁用索引的自动索引创建,但需要允许另一个索引。如何通过弹性搜索禁用特定索引的自动索引创建?
我试过

I need to disable automatic index creation for an index but need to permit for another one. How can I disable the automatic index creation by elasticsearch for a particular index only? I tried

action.auto_create_index: false

在elasticsearch.yml文件中,但似乎禁用所有的所有自动索引。
任何人可以帮助我吗?

in elasticsearch.yml file,but it seems to disable all the automatic indexing for all. Can anybody help me on this?

推荐答案

action.auto_create_index有点复杂,超出真/假值。我们可以使用索引名称中发生的模式进行识别,并且可以指定是否可以自动创建它是否可以自动创建。

"action.auto_create_index" is a bit complex beyond the true/false values. We can use patterns occuring in the index names to be identified and can specify whether it can be created automatically if it is not already existing.

一个例子是

action.auto_create_index: -b*,+a*,-*

这里以a开头的索引将自动创建,但以b开头的其他索引是不允许的。 - *表示不允许使用其他索引,如果需要手动创建索引。

Here the index starting with "a" will be created automatically,but others starting with "b" are not allowed. -* indicates that other indices are not allowed and if you want you need to create them manually.

值的顺序也很重要。有关详细信息,请访问他们的文档 here

Also the order of the values also matters. For details,you can visit their documentation here

这篇关于如何禁用弹性搜索中的自动索引创建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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