Available fields are not visible in the Discovery panel


I have some indices where a part of their corresponding template is like this:

when I query the indices in the Dev Tools, I am able to retrieve desired data and see the above fields. For example

you can clearly see that labels.state and labels.pipeline_version are available for this specific document. I can even search for a specific field

But I can't see all fields in the Discover section (for example labels.state)!

Any idea? Thanks!

The flyout in the last screenshot gives away the problem:

This field is present in yout Elasticsearch mapping but not in the 500 documents shown in the doc table

Discover only loads 500 documents, and by chance out of the 116k documents in your index these 500 do not have labels. Try searching for labels ysing the search bar on top (labels:state: *)