0
我希望向默認的「英語」添加更多單詞,例如「inc」,「incorporated」,「ltd」和「limited」。我怎樣才能做到這一點?如何將停用詞添加到ElasticSearch中的默認列表中
我目前創建索引的代碼如下。謝謝。
PUT /my_index
{
"settings": {
"analysis": {
"filter": {
"my_stop": {
"type": "stop",
"stopwords": "_english_"
}
},
"analyzer": {
"my_analyzer": {
"tokenizer": "whitespace",
"char_filter": [
"html_strip"
],
"filter": [
"lowercase",
"asciifolding",
"my_stop"
]
}
}
}
}
}
我的測試碼
POST my_index/_analyze
{
"analyzer": "my_analyzer",
"text": "House of Dickson<br> corp"
}
謝謝。如果我使用Elastic Cloud(沒有在本地安裝ES),是否可以創建自定義停用字詞文件? – Redzon
我不使用Elastic Cloud,但我認爲您需要在[Elastic Support Portal](https://support.elastic.co/customers/s/login/)中申請支持憑單。類似的情況在這裏:[stopwords list upload](https://discuss.elastic.co/t/please-activate-synonyms-and-stopwords-list-upload/88124)。 – Joanna