我是Elasticsearch的新手,我正在尝试使用一些测试,但是在使用(本例中)法语分析器和停止单词时,我遇到了一个问题。这是我建立的索引:
test1: {
state: open
settings: {
index.analysis.analyzer.french.tokenizer: standard
index.analysis.filter.stop_fr.stopwords.0: _french_
index.analysis.filter.stop_fr.type: stop
index.analysis.analyzer.french.filter.1: stop_fr
index.analysis.analyzer.french.filter.0: lowercase
index.analysis.analyzer.french.type: custom
index.number_of_shards: 5
index.number_of_replicas: 1
index.version.created: 900299
}然而,当我从ES头运行“测试分析器”工具时,法语停止词仍在传递,而英语停止词(the、a等)仍然存在。不是的。任何洞察力都会很感激的。谢谢!
发布于 2013-07-29 06:44:59
还应更改索引映射设置。
索引由default_analyzer自动分析,当然是删除英语停止词。使用两种信息content和time的示例映射
"testindex": {
"testtype": {
"search_analyzer": "test_analyzer", // <-- search_analyzer
"properties": {
"content": {
"type": "string",
"store": true,
"analyzer": "test_analyzer" // <-- index_analyzer
},
"time": {
"type": "date",
"store": true,
"format": "dateOptionalTime"
}
}
}
}https://stackoverflow.com/questions/17910563
复制相似问题