# Rebuild highlight result

**URL:** <https://discuss.elastic.co/t/rebuild-highlight-result/162029>\
**Category:** Elasticsearch\
**Created:** [December 24, 2018, 8:21pm UTC](https://discuss.elastic.co/t/rebuild-highlight-result/162029 "2018-12-24T20:21:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmed\_EBEN\_HASSINE](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahmed_eben_hassine/32/110483_2.png) [@Ahmed\_EBEN\_HASSINE](https://discuss.elastic.co/u/Ahmed_EBEN_HASSINE)\
**Post date:** [December 24, 2018, 8:21pm UTC](https://discuss.elastic.co/t/rebuild-highlight-result/162029/1 "2018-12-24T20:21:20Z")

</div>

I'm trying to **highlight** my search results. i'm flowing this part of doc [https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-highlighting.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-highlighting.html)  
  
This is my elastic query :

```
"query" : {
    "match": { "title": "a" }
  },
  "highlight": {
    "pre_tags": [
      "<strong>"
    ],
    "post_tags": [
      "<strong>"
    ],
    "fields": {
      "title": {
        "fragment_size": 150,
        "number_of_fragments": 1
      }
    }
  },

```

Im' getting this kind of result:

```
"hits": [
       {
        ...
        "_source": {
            "title": "aut",
        },
        "highlight": {
            "title": [
                "<strong>aut<strong>"
            ]
        }
    },
...

```

I want to applie the heighlt to the result under the `_source` key. Is it possible to modify some configuration to have a result looks like this instead:

```
"hits": [
       {
        ...
        "_source": {
             "<strong>aut<strong>"
        }
    },
...
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 21, 2019, 8:21pm UTC](https://discuss.elastic.co/t/rebuild-highlight-result/162029/2 "2019-01-21T20:21:38Z")

</div>

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