Kibana Discover highligth fragment size

Hi there,

when using Elasticsearch API it is possible to define de highlight fragment size to have a better visualization of the highlight portion, example:

{
  "query": {
    "match": {
      "text_field": "search term"
    }
  },
  "highlight": {
    "fields": {
      "text_field": {
        "fragment_size": 200,
        "number_of_fragments": 3
      }
    }
  }
}

I am trying to acomplish the same thing on the Kibana Discover search, but did not find a way to configure it. Either on the configuration settings or on the query string of the Discover.

Is there any way to have that on Discover search?

Tks.

Thanks for reaching out, @rodrigopaulodecastro . I’m currently not aware of a direct way to configure highlight fragment size and number of fragments like you can with the Elasticsearch API in Discover. Have you considered creating a custom visualization using Vega?

Hi Jess, actually not, I thought Vega was used just to plot charts, not for a search result table like Discover provide.

I will try.

If you are aware, can you pls give me the directions on how to accomplish that?

Tks