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