我想使用nori
分析器和同义词过滤器
我不确定type
参数是否如下所示。
{ "location_analyzer": {
'type': 'nori',
'filter': ['location_synonym_filter'],
},
"location_synonym_filter": {
"type": "synonym",
"expand": True,
"synonyms_path": "data/synonyms_location",
}
}
答案 0 :(得分:0)
由于要添加新的过滤器,因此需要创建新的自定义分析器。查看该分析器的定义,然后创建一个新的“ custom”类型。
某些文档: https://www.elastic.co/guide/en/elasticsearch/plugins/current/analysis-nori-analyzer.html https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-custom-analyzer.html