13

I'm new to elastic search and I was wondering if it's possible to delete a custom analyzer or a custom filter from an index..

For example, imagine the following index settings:

    "settings" : {
        "analysis": {
            "filter":{
                "filter_metaphone":{
                    "encoder": "metaphone",
                    "type": "phonetic",
                    "replace": "false"
                },
                "filter_unused":{
                    "type": "edgeNGram",
                    "max_gram": "10",
                    "min_gram": "1" 
                }
            },
            "analyzer":{
                "name":{
                    "type": "custom",
                    "filter": ["filter_metaphone"],
                    "tokenizer": "standard"
                }
            }
        }   
    }

Is there any way to delete via curl the filter "filter_unused" without remove and create the index with a new settings configuration?

4

2 回答 2

2

将所有值设置为 null 后,分析器对我来说消失了(ES 6.8)

{
  "analysis": {
    "analyzer": {
      "my_search_analyzer" : {
        "filter" : null,
        "tokenizer" : null
      }
    }
  }
}
于 2021-01-08T14:05:17.313 回答
1

不,目前无法从索引设置中删除一个特定的分析器。

不过,您可以添加新的分析器。该 API 记录在这里。

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-update-settings.html#indices-update-settings

于 2014-06-18T00:33:16.987 回答