dav3860
(Dav3860)
November 10, 2016, 4:11pm
1
Hi,
I used to create "bool" filters in Kibana to mimic an "OR". For example see :
kibana, kibana-4
Since I upgraded to elasticsearch and Kibana 5.0, this doesn't work anymore. I imagine that it's because the bool filter was replaced by a bool query in elasticsearch 5.0 (https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-filter.html ). I can't get it to work.
Do you know how I can make an "OR" between two filters in ES/Kibana 5.0 ?
BigFunger
(Jim Unger)
November 10, 2016, 9:25pm
2
I was able to modify a filter in 5.0 to achieve an OR filter.
I changed it from a match
query to a query_string
query. elasticsearch docs
Original Filter:
{
"query": {
"match": {
"geo.dest": {
"query": "CN",
"type": "phrase"
}
}
}
}
Or Filter:
{
"query": {
"query_string" : {
"fields" : ["geo.dest"],
"query" : "IN OR CN"
}
}
}
Will that work for you?
dav3860
(Dav3860)
November 14, 2016, 10:16am
3
Thank you ! It solved my problem.
system
(system)
Closed
December 12, 2016, 3:46pm
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.