【发布时间】:2014-07-18 07:05:20
【问题描述】:
我是 Elasticsearch 的新手,对匹配查询的工作方式感到困惑。我有这个映射:
{
"product": {
"properties": {
"condition" : { "type" : "string", "store" : "yes", "index": "analyzed"}
}
}
}
我批量导入了以下文件
{ "index": {"_index": "myindex", "_type": "product", "_id": "1"}}
{ "condition": "All Quiet on the Western Front"}
{ "index": {"_index": "myindex", "_type": "product", "_id": "2"}}
{ "condition": "All Quieter on the Western Front"}
{ "index": {"_index": "myindex", "_type": "product", "_id": "3"}}
{ "condition": "All Quietest on the Western Frontline"}
我确认所有文档都已成功加载。然后我做一个匹配查询:
{
"query" : {
"match" : {
"condition" : "quiet"
}
}
}
它只返回#1 文档。我在这里很困惑。为什么它不返回所有三个文件?我应该使用什么查询来返回这三个文档,因为它们在字段中都有“安静”的根词?
感谢和问候。
【问题讨论】:
标签: elasticsearch