Excluded fields in index pattern still shows up as suggestions in search bar

I have excluded the field NodeAlias and NodeAlias.keyword in my index pattern. But when I am viewing my data in discovery and clicking in the search bar with kql as search language the excluded field is still suggested. It seems weird that you would filter on a field you don't want to see...

I have another index where there are a lot of fields in the documents and need to find a way to select which fields are used as suggestions in the search bar.


The excluse field only removes them from the index pattern, the suggestion uses the field API which doesn't take in consideration the removed fields from the index pattern. This does indeed seem like an oversight from us and it looks similar to this: Kibana autocomplete should show existing fields and not all fields · Issue #24709 · elastic/kibana · GitHub

Only workaround I can think of (and it is a longshot) would be to leverage Field Level security to completely remove access to those fields.

Thank you for the response!

I did think about Field Level security but that requires a license which was not an option in this case.

But I actually found an ugly workaround.
If you set the type to completion in the mapping, the field is searchable but not viewed in the search bar. The downside to this solution is that the fields with this mapping behave like a keyword when queried the "normal" way (not by suggest).

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