How to filter against a wildcard name of a field?

I have documents that have fields such as

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?

Hello @Wpq,

Did you try something like this?

vulns* : *

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

Hope it helps!

1 Like

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

1 Like

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