1
我配置elasticsearch.yml我的全球定製分析,這裏是我的配置:ElasticSearch未能找到分析器?
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
}
運行'curl -XGET localhost:9200/your_index'時會得到什麼?也似乎你錯過了上面的標記器定義,你可以添加它嗎? – Val
我已經在ES 2.3.2上試過了你的配置(修復了一些拼寫錯誤之後),它對我來說工作正常,並且產生了預期的標記。 – Val