Elasticsearch无法更新非动态设置 [英] Elasticsearch can't update non dynamic settings

查看:4592
本文介绍了Elasticsearch无法更新非动态设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个测试分析器来试验弹性搜索的分析。我有一个名为mytest的索引可用且可搜索,但当我尝试创建自定义分析器时,我得到以下错误

I am trying to create a test analyzer to experiment on analysis on Elastic Search. I have an index created called "mytest" which is available and searchable, but when I try to create a custom analyzer I get below error

{
"error": "ElasticsearchIllegalArgumentException[Can't update non dynamic settings[[index.analysis.analyzer.content.type, index.analysis.analyzer.content.tokenizer]] for open indices [[mytest]]]",
"status": 400
}

现在我我不确定更新设置的限制,但我在文档中找不到任何内容。我可以在创建索引时创建分析,但更新不起作用。

Now I am not sure on restrictions on updating settings but I could not find anything in documentation. I can create the analyze when creating the index, but update does not work.

使用以下来源创建分析器

Using the source below to create analyzer

PUT mytest/_settings
{
  "analysis" : {
    "analyzer":{
      "content":{
        "type":"custom",
        "tokenizer":"whitespace"
      }
    }
  }
}

任何想法?

推荐答案

你可以当索引处于打开状态时,不更新索引的设置。您需要关闭索引并更新设置并打开索引。

You can't update the settings of index when the index is in open status. You need to close the index and update the settings and open the index.

参考:错误

Refer : error when trying to update the settings

这篇关于Elasticsearch无法更新非动态设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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