# How to filter against a wildcard name of a field?

**URL:** <https://discuss.elastic.co/t/how-to-filter-against-a-wildcard-name-of-a-field/335693>\
**Category:** Kibana\
**Created:** [June 10, 2023, 3:33pm UTC](https://discuss.elastic.co/t/how-to-filter-against-a-wildcard-name-of-a-field/335693 "2023-06-10T15:33:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wpq](https://avatars.discourse-cdn.com/v4/letter/w/3da27b/32.png) [@Wpq](https://discuss.elastic.co/u/Wpq)\
**Post date:** [June 10, 2023, 3:33pm UTC](https://discuss.elastic.co/t/how-to-filter-against-a-wildcard-name-of-a-field/335693/1 "2023-06-10T15:33:30Z")

</div>

I have documents that have fields such as

```auto
vulns.something_1.a
vulns.something_1.b

```

- the element `something_1` may change between documents
- some documents have the `vulns` entries, and some do not.

My problem: I would like to filter the documents with `vulns.*` fields.

I thought that simply filtering for `vulns.*` would work - it does not. I also trued to use `_exists: vulns.*` - still nothing.

Is it possible to filter documents for those with a filed with a name partially dynamic?

---

<div class="post-metadata">

**Author:** ![Priscilla\_Parodi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/priscilla_parodi/32/43047_2.png) [@Priscilla\_Parodi](https://discuss.elastic.co/u/Priscilla_Parodi)\
**Post date:** [June 10, 2023, 5:44pm UTC](https://discuss.elastic.co/t/how-to-filter-against-a-wildcard-name-of-a-field/335693/2 "2023-06-10T17:44:12Z")

</div>

Hello @Wpq,

Did you try something like this?

`vulns* : *`

This query will retrieve all documents `*` from fields starting with `vulns`.

Hope it helps!

---

<div class="post-metadata">

**Author:** ![Wpq](https://avatars.discourse-cdn.com/v4/letter/w/3da27b/32.png) [@Wpq](https://discuss.elastic.co/u/Wpq)\
**Post date:** [June 10, 2023, 7:54pm UTC](https://discuss.elastic.co/t/how-to-filter-against-a-wildcard-name-of-a-field/335693/3 "2023-06-10T19:54:31Z")

</div>

Oh thank you! It works. This is the one combination that I dd not try (retroactively, it is indeed obvious)

---

<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:** [July 8, 2023, 7:55pm UTC](https://discuss.elastic.co/t/how-to-filter-against-a-wildcard-name-of-a-field/335693/4 "2023-07-08T19:55:31Z")

</div>

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