インデックスがfield
、値が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"
}
} ]
}
}
マッピングと予想される結果を掲載できますか? – moliware
また、アナライザー設定? – shyos
@shyosどうすれば入手できるのか分かりません。 1.flv完全一致1.flvと2.flv完全一致2.flv(1.flvでない) – user2786037