How to save wildcard query as filter to pin in Kibana?


#1

Hi,

I am using ELK GA5.0.0. I have a field field_a in my index. I run the following query;

field_a:qwe*

My intention is to display entries having field_a entries qwe001, qwe002, qwe003 etc. Also, I would like to display entries with NONE in field_a. To begin with, I pinned a field with * in search box. When I edit the query, it was like this;

{
  "query": {
    "match": {
      "field_a": {
        "query": "qwe001",
        "type": "phrase"
      }
    }
  }
}

and I changed it to;

{
  "query": {
    "match": {
      "field_a": {
        "query": "qwe*"
      }
    }
  }
}

Now it says no results to display. How can I do this?

Thanks.


(Brandon Kobel) #2

When you enter a string in the query bar, it's doing the equivalent of:

{
  "query": {
    "query_string": {
      "query": "field_a:qwe*",
      "analyze_wildcard": true
    }
  }
}

where when you add a filter via the UI, it's doing a phrase query instead.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.