【问题标题】:Elasticsearch can't update non dynamic settingsElasticsearch 无法更新非动态设置
【发布时间】:2015-12-08 03:58:09
【问题描述】:

我正在尝试创建一个测试分析器来试验 Elastic Search 的分析。我创建了一个名为“mytest”的索引,该索引可用且可搜索,但是当我尝试创建自定义分析器时出现以下错误

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

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

使用下面的源码创建分析器

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

有什么想法吗?

【问题讨论】:

  • 这可能是help
  • @keety 确实如此

标签: indexing elasticsearch analyzer


【解决方案1】:

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

参考:error when trying to update the settings

【讨论】:

【解决方案2】:

如果尝试在 Elasticsearch DSL for Python 中设置非动态设置,请确保将它们传递给 index.settings() 而不是动态的 index.put_settings()

【讨论】:

    猜你喜欢
    • 2019-05-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-10-01
    • 1970-01-01
    • 2016-12-11
    • 1970-01-01
    相关资源
    最近更新 更多