# Kibana Discover highligth fragment size

**URL:** <https://discuss.elastic.co/t/kibana-discover-highligth-fragment-size/381309>\
**Category:** Elasticsearch\
**Created:** [August 25, 2025, 11:22am UTC](https://discuss.elastic.co/t/kibana-discover-highligth-fragment-size/381309 "2025-08-25T11:22:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodrigopaulodecastro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rodrigopaulodecastro/32/142553_2.png) [@rodrigopaulodecastro](https://discuss.elastic.co/u/rodrigopaulodecastro)\
**Post date:** [August 25, 2025, 11:22am UTC](https://discuss.elastic.co/t/kibana-discover-highligth-fragment-size/381309/1 "2025-08-25T11:22:27Z")

</div>

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:

```auto
{
  "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.

---

<div class="post-metadata">

**Author:** ![jessgarson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jessgarson/32/129841_2.png) [@jessgarson](https://discuss.elastic.co/u/jessgarson)\
**Post date:** [August 27, 2025, 6:56pm UTC](https://discuss.elastic.co/t/kibana-discover-highligth-fragment-size/381309/2 "2025-08-27T18:56:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![rodrigopaulodecastro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rodrigopaulodecastro/32/142553_2.png) [@rodrigopaulodecastro](https://discuss.elastic.co/u/rodrigopaulodecastro)\
**Post date:** [August 27, 2025, 11:47pm UTC](https://discuss.elastic.co/t/kibana-discover-highligth-fragment-size/381309/3 "2025-08-27T23:47:56Z")

</div>

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
