Hi,
I have a query in Kibana like;
user_id:user1|user2
This displays entries having either user1
or user2
. I made a positive filter for user_id
like;
{
"query": {
"match": {
"user_id": {
"query": "user1|user2",
"type": "phrase"
}
}
}
}
which is not working. It works fine with a single keyword like;
{
"query": {
"match": {
"user_id": {
"query": "user1",
"type": "phrase"
}
}
}
}
My questions are,
- Why is this happening?
- Is it possible to include multiple keywords in a filter?
- What is the best practice? Is it with multiple keywords (in query box. my first scenario), or applying a filter (second scenario) is better to save a search if I have ~100 keywords?
Thanks in advance..