ElasticSearch 找不到分析器?

ElasticSearch failed to find analyzer?

我在 elasticsearch.yml 中配置了我的全局自定义分析器,这是我的配置:

index :
analysis :
    analyzer :
        titleAnalyzer :
            type : custom
            tokenizer : ik_max_word
            filter : [titleSynoymFilter, englishStemmerFilter]
    filter :
        titleSynoymFilter :
            type : synonym
            synonyms_path : ../analysis/title_synonym.txt
        englishStemmerFilter :
            type : stemmer
            name : english

然后我通过 运行 命令 $ echo 'A drop in the ocean'| http :5600/_analyze?analyzer=titleAnalyzer

测试我的分析仪

但是 elasticsearch 告诉我找不到分析器:

{
"error": {
    "reason": "failed to find analyzer [titleAnalyzer]",
    "root_cause": [
        {
            "reason": "[elastisearch][127.0.0.1:9300][indices:admin/analyze[s]]",
            "type": "remote_transport_exception"
        }
    ],
    "type": "illegal_argument_exception"
},
"status": 400
}

如果您在根路径上调用 /_analyze 找不到分析器,请尝试在路径上至少指定一个现有索引

$ echo 'A drop in the ocean'| http :5600/some_index/_analyze?analyzer=titleAnalyzer
                                              ^
                                              |
                                      add an index here