Ich habe einen Index mit field
Video mit Wert 1.flv
. Wenn ich die folgende Abfrage mache:Elasticsearch query_string genaue Übereinstimmung
"query": {
"query_string": {
"query": "2.flv"
}
}
Abfrage gibt immer noch alle Datensätze mit 1.FLV zurück.
Kann mir jemand auf die richtige Lösung hinweisen?
Hier ist Beispieldaten für 1.flv zurückgegeben (wie man sehen kann, nichts enthält 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"
}
} ]
}
}
Können Sie Ihr Mapping und das erwartete Ergebnis veröffentlichen? – moliware
Und auch Analyzer Einstellungen? – shyos
@shyos Ich bin mir nicht sicher, wie ich es bekommen kann. Ich brauche 1.FLV genaue Übereinstimmung 1.FLV und 2.FLV genau passen NUR 2.FLV (nicht 1.FLV) – user2786037