我有一个包含字段名为video
且值为1.flv
的索引。如果我执行以下查询:
"query": {
"query_string": {
"query": "2.flv"
}
}
查询仍然会返回所有带有1.flv的记录。
有没有人能指点我正确的解决方案?
这是针对1.flv返回的示例数据(正如您所看到的,没有任何内容包含2.flv!)
"hits" : {
"total" : 8,
"max_score" : 0.625,
"hits" : [ {
"_index" : "videos",
"_type" : "comment",
"_id" : "_meta",
"_score" : 0.625,
"fields" : {
"video" : "1.flv",
"body" : "Really?"
}
}, {
"_index" : "videos",
"_type" : "comment",
"_id" : "0fYsYOTHT7O-7P6CVi7l3w",
"_score" : 0.625,
"fields" : {
"video" : "1.flv",
"body" : "fadsfasfas"
}
}, {
"_index" : "videos",
"_type" : "comment",
"_id" : "O9VjgFdmQra6hYxwMdGuTg",
"_score" : 0.48553526,
"fields" : {
"video" : "1.flv",
"body" : "Search is hard. Search should be easy."
}
}, {
"_index" : "videos",
"_type" : "comment",
"_id" : "A6k3FEKKSzKTSAVIT-4EbA",
"_score" : 0.48553526,
"fields" : {
"video" : "1.flv",
"body" : "Really?"
}
}, {
"_index" : "videos",
"_type" : "comment",
"_id" : "eFnnM4PrTSyW6wfxHWdE8A",
"_score" : 0.48553526,
"fields" : {
"video" : "1.flv",
"body" : "Hello!"
}
}, {
"_index" : "videos",
"_type" : "comment",
"_id" : "ZogAiyanQy6ddXA3o7tivg",
"_score" : 0.48553526,
"fields" : {
"video" : "1.flv",
"body" : "dcxvxc"
}
}, {
"_index" : "videos",
"_type" : "comment",
"_id" : "O0HcT7aGTrqKQxF25KsOwQ",
"_score" : 0.37158427,
"fields" : {
"video" : "1.flv",
"body" : "Hello!"
}
}, {
"_index" : "videos",
"_type" : "comment",
"_id" : "l2d53OFITb-etooWEAI0_w",
"_score" : 0.37158427,
"fields" : {
"video" : "1.flv",
"body" : "dasdas"
}
} ]
}
}