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

**URL:** <https://discuss.elastic.co/t/how-to-save-wildcard-query-as-filter-to-pin-in-kibana/119184>\
**Category:** Kibana\
**Created:** [February 9, 2018, 8:12am UTC](https://discuss.elastic.co/t/how-to-save-wildcard-query-as-filter-to-pin-in-kibana/119184 "2018-02-09T08:12:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticheart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticheart/32/65189_2.png) [@elasticheart](https://discuss.elastic.co/u/elasticheart)\
**Post date:** [February 9, 2018, 8:12am UTC](https://discuss.elastic.co/t/how-to-save-wildcard-query-as-filter-to-pin-in-kibana/119184/1 "2018-02-09T08:12:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [February 12, 2018, 3:18pm UTC](https://discuss.elastic.co/t/how-to-save-wildcard-query-as-filter-to-pin-in-kibana/119184/2 "2018-02-12T15:18:59Z")

</div>

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

```auto
{
  "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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 12, 2018, 3:19pm UTC](https://discuss.elastic.co/t/how-to-save-wildcard-query-as-filter-to-pin-in-kibana/119184/3 "2018-03-12T15:19:00Z")

</div>

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