elasticsearch删除自定义分析器/过滤器

use*_*458 11 filter analyzer elasticsearch

我是弹性搜索的新手,我想知道是否可以从索引中删除自定义分析器或自定义过滤器.

例如,假设以下索引设置:

    "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"
                }
            }
        }   
    }
Run Code Online (Sandbox Code Playgroud)

有没有办法通过curl删除过滤器"filter_unused"而不删除并使用新的设置配置创建索引?

And*_*ndy 1

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

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

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