我正在为一系列网站编写基于Elasticsearch的搜索服务,这些网站的内容用瑞典语,德语和芬兰语等凝聚语言编写。
我知道Elasticsearch默认提供语言分析器,但经过一些测试后,我发现他们的支持最多只是马虎。
到目前为止我得到的是:
{
"settings":{
"analysis":{
"filter":{
"swedish_stop":{
"type": "stop",
"stopwords": "_swedish_"
},
"swedish_stemmer":{
"type":"stemmer",
"language":"swedish"
},
"swedish_words":{
"type":"dictionary_decompounder",
"word_list":["very", "long", "list", "of", "words", "almost", "13", "MB"]
}
},
"analyzer":{
"custom_swedish":{
"tokenizer": "standard",
"filter":[
"lowercase",
"swedish_stop",
"swedish_stemmer",
"swedish_words"
],
"char_filter":[
"html_strip"
]
}
}
}
}
}
你们有线索吗?