Elasticsearch can't update non dynamic settings

百般思念 提交于 2019-12-24 15:21:38

问题


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"
      }
    }
  }
}

Any ideas ?


回答1:


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



来源:https://stackoverflow.com/questions/32526016/elasticsearch-cant-update-non-dynamic-settings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!