我目前正在尝试改进我的弹性搜索结果的极端情况。一个特别让我头疼的是:“google+”被简单地简化为“google”。省略特殊字符通常很好,但对于这个我想要一个例外。任何想法如何实现这一目标?
我尝试了以下设置:
{
"index": {
"analysis": {
"analyzer": {
"default": {
"tokenizer": "standard",
"filter": [
"synonym",
"word_delimiter"
]
}
},
"filter": {
"synonym": {
"type": "synonym",
"synonyms_path": "analysis/synonym.txt"
},
"word_delimiter": {
"type": "word_delimiter",
"protected_words_path": "analysis/protected.txt"
}
}
}
}
}
protected.txt 包含一行 google+