直接删除所有Elasticsearch索引而不会卷曲 [英] Delete all elasticsearch indices directly without curl

查看:160
本文介绍了直接删除所有Elasticsearch索引而不会卷曲的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开始Elasticsearch,并出现错误:

I am starting elasticsearch, and getting the error:

java.lang.IllegalStateException: unable to upgrade the mappings for the index [[documents/xOOEXQB-RzGhQp7o7NNH9w]]
    at org.elasticsearch.cluster.metadata.MetaDataIndexUpgradeService.checkMappingsCompatibility(MetaDataIndexUpgradeService.java:172) ~[elasticsearch-5.5.0.jar:5.5.0]

我不确定是什么原因导致了这种情况的发生。我确实做了
的简要升级elasticsearch ,但是我没有记下最新版本。我目前正在使用Elasticsearch 5.5。

I am not exactly sure what caused this to happen. I did do a brew upgrade elasticsearch but I didn't note down the last version. I am currently on elasticsearch 5.5.

我想清除所有用于Elasticsearch的映射/索引。我不需要这些数据进行测试。大多数文档说要使用

I would like to just clear away all the mappings/indices for elasticsearch. I don't need these data as it is for testing. Most of the documentation says to use

curl -XDELETE 'http://localhost:9200/_all'

但是,本地主机:9200无法访问(以前是),大概是因为elasticsearch无法正确启动,所以它是

However, localhost:9200 isn't reachable (it was previously), presumably because elasticsearch cannot be properly started so it is a bit of chicken and egg.

我是否可以手动清除所有Elasticsearch数据?

Is there a way for me to clear away all elasticsearch data manually?

推荐答案

您可能还有一些剩余的索引与最新的ES版本不兼容,最肯定的是您以前使用过ES 1.x。

You probably have some remaining indices that are incompatible with your newest ES version, most certainly you were on ES 1.x before.

您只需删除 $ ES_HOME / data / * 文件夹下的任何内容。由于您是通过brew安装的,因此 ES_HOME 通常位于 / usr / local / Cellar / elasticsearch

You can simply delete anything under the $ES_HOME/data/* folder. Since you installed ES via brew, ES_HOME is usually located at /usr/local/Cellar/elasticsearch

这篇关于直接删除所有Elasticsearch索引而不会卷曲的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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