# Trying to use a wildcard to filter the Kibana output

**URL:** <https://discuss.elastic.co/t/trying-to-use-a-wildcard-to-filter-the-kibana-output/351921>\
**Category:** Kibana\
**Created:** [January 27, 2024, 9:21pm UTC](https://discuss.elastic.co/t/trying-to-use-a-wildcard-to-filter-the-kibana-output/351921 "2024-01-27T21:21:56Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henriette](https://avatars.discourse-cdn.com/v4/letter/h/ecccb3/32.png) [@Henriette](https://discuss.elastic.co/u/Henriette)\
**Post date:** [January 27, 2024, 9:21pm UTC](https://discuss.elastic.co/t/trying-to-use-a-wildcard-to-filter-the-kibana-output/351921/1 "2024-01-27T21:21:56Z")

</div>

Hey all - I'm new to Kibana/Elasticsearch, and I'm using it to get the number of views for my blog pages. I'm only interested in views of actual pages, not all the things the bots are hitting.' so i've excluded a number of pages by adding a filter on 'url.path'

Worked like a charm! However, now I'm seeing all these hits on images, which I'd like to also exclude by using something like NOT /sites/default/files/inline-images/\*  
I added it it the same manner that I used to exclude specific URLs, but I can't seem to make a wild card work in the search filter. All suggestions much appreciated!

 ![Screenshot 2024-01-27 131846](https://us1.discourse-cdn.com/elastic/original/3X/f/6/f6b6772d43fdf9ae4346f4f919d6ce7b110fcfb9.png)

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [February 2, 2024, 5:27pm UTC](https://discuss.elastic.co/t/trying-to-use-a-wildcard-to-filter-the-kibana-output/351921/2 "2024-02-02T17:27:58Z")

</div>

Hi @Henriette, welcome to the Elastic Community forum!

To put a search text in the bar you should use the notation `fieldName: "pattern"`, something like this (using the sample logs dataset)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/e/fe56db7fdddf53c715da89d620772abb2d5c76d1.png)

---

<div class="post-metadata">

**Author:** ![Henriette](https://avatars.discourse-cdn.com/v4/letter/h/ecccb3/32.png) [@Henriette](https://discuss.elastic.co/u/Henriette)\
**Post date:** [February 3, 2024, 2:25am UTC](https://discuss.elastic.co/t/trying-to-use-a-wildcard-to-filter-the-kibana-output/351921/3 "2024-02-03T02:25:04Z")

</div>

Thank you so much for responding! However, I tried and sadly it didn't work... Adding the filter on that top line actually made the URLs show up that I am filtering out on the next line....

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/e/ee846e43bfcf274567bd1a5477354d568744169c.png)

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [February 5, 2024, 11:20am UTC](https://discuss.elastic.co/t/trying-to-use-a-wildcard-to-filter-the-kibana-output/351921/4 "2024-02-05T11:20:29Z")

</div>

You used `url` but seems in your case is `url.path`, right?

---

<div class="post-metadata">

**Author:** ![Henriette](https://avatars.discourse-cdn.com/v4/letter/h/ecccb3/32.png) [@Henriette](https://discuss.elastic.co/u/Henriette)\
**Post date:** [February 5, 2024, 6:03pm UTC](https://discuss.elastic.co/t/trying-to-use-a-wildcard-to-filter-the-kibana-output/351921/5 "2024-02-05T18:03:26Z")

</div>

I've tried url.path... I still have all the .png files show up

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/f/ffa233629e38d1e63b2fec1ae221d68518fcac21.png)

---

<div class="post-metadata">

**Author:** ![Henriette](https://avatars.discourse-cdn.com/v4/letter/h/ecccb3/32.png) [@Henriette](https://discuss.elastic.co/u/Henriette)\
**Post date:** [February 5, 2024, 6:04pm UTC](https://discuss.elastic.co/t/trying-to-use-a-wildcard-to-filter-the-kibana-output/351921/6 "2024-02-05T18:04:47Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/e/0/e0222d59a505f23ff36284e7f4a9e4756d3d06dc.png)

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [February 6, 2024, 6:59am UTC](https://discuss.elastic.co/t/trying-to-use-a-wildcard-to-filter-the-kibana-output/351921/7 "2024-02-06T06:59:32Z")

</div>

are you sure `url.path` is indexed as a text field and not as a keyword? You can check this in the data view UI or directly in the index management UI.

Have you tried to run a search query on the Console?

---

<div class="post-metadata">

**Author:** ![Henriette](https://avatars.discourse-cdn.com/v4/letter/h/ecccb3/32.png) [@Henriette](https://discuss.elastic.co/u/Henriette)\
**Post date:** [February 6, 2024, 2:47pm UTC](https://discuss.elastic.co/t/trying-to-use-a-wildcard-to-filter-the-kibana-output/351921/8 "2024-02-06T14:47:38Z")

</div>

Hi Jorge! I was using a prebaked Kibana dashboard, so am very new to this. I found that you can look the fields via discover, and it looks like you are right: it says it is a key. I guess I am about to learn how to add an index with url as a text field 🙂 Would you be able to point me to a knowledge article? Thanks very much!

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/6/0670efdbcbb6fe6352347ed4def147c1a10b56eb.png)

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [February 6, 2024, 3:29pm UTC](https://discuss.elastic.co/t/trying-to-use-a-wildcard-to-filter-the-kibana-output/351921/9 "2024-02-06T15:29:26Z")

</div>

Sure! Take a look at the Elasticsearch documentation on how to map a field as _both_ a text and a keyword type

> **[fields | Elasticsearch Guide \[8.12\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-fields.html)**

The idea is that a text field is available for search and querying while the keyword field is used for aggregations (as your charts). You must first [update your index mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html) and then [update](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html) or [reindex](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html) your index so your dashboards can do both tasks.

---

<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 5, 2024, 3:29pm UTC](https://discuss.elastic.co/t/trying-to-use-a-wildcard-to-filter-the-kibana-output/351921/10 "2024-03-05T15:29:55Z")

</div>

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