[Discover] Search Bar Preview trims field names

Hey,

I'm using Kibana 8.1.0 and when I try to search for certain fields in the tab "Discover", fields which are longer than a specific length are trimmed. Have a look at the Screenshot:


For Example the full name is request.RequestData.orderBasketIn.header.buyerReference but the displayed name ist just request.RequestData.orderBasketIn.

I already found an issue on Github which should be solved before my version (8.1.0).
https://github.com/elastic/kibana/issues/34971

It seems that the bug is still existing.

I'm grateful for help.

Regards

I reproduced this issue in 8.1.0 with the following index and data

PUT delete_long_field_names
{
  "settings": {
    "number_of_replicas": 1
  },
  "mappings": {
    "properties": {
      "this.is.a.very.long.file.name.that.could.break.discover.search.bar": {
        "type": "text"
      }
    }
  }
}

POST delete_long_field_names/_doc
{
  "this.is.a.very.long.file.name.that.could.break.discover.search.bar": "foobar"
}

Getting this discover autocomplete

But then I upgraded to the last version from the 8.1.x series which is 8.1.3 and it's fixed

I also tested in 8.2.3 which is the latest stable release and it's also working fine.