# How to debug when the search result doesn't return any highlight objects?

**URL:** <https://discuss.elastic.co/t/how-to-debug-when-the-search-result-doesnt-return-any-highlight-objects/201472>\
**Category:** Elasticsearch\
**Created:** [September 27, 2019, 9:41pm UTC](https://discuss.elastic.co/t/how-to-debug-when-the-search-result-doesnt-return-any-highlight-objects/201472 "2019-09-27T21:41:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![apraditya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/apraditya/32/54575_2.png) [@apraditya](https://discuss.elastic.co/u/apraditya)\
**Post date:** [September 27, 2019, 9:41pm UTC](https://discuss.elastic.co/t/how-to-debug-when-the-search-result-doesnt-return-any-highlight-objects/201472/1 "2019-09-27T21:41:28Z")

</div>

I have the following search structure payload

```auto
GET es_index1,es_index2/_search?pretty
{
  "query": {
    "function_score": {
    }
  },
  "highlight": {
    "fields": {
      "summary.analyzed": {},
      "detail.analyzed": {}
    }
  },
  "timeout": "21s",
  "_source": false,
  "size": 8,
  "from": 0
}

```

For some query texts, the results don't return any highlight even though they contain the query text. If the highlight object I sent is correct, then how to debug this? On what cases the highlight may not exists in the result?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 30, 2019, 12:27pm UTC](https://discuss.elastic.co/t/how-to-debug-when-the-search-result-doesnt-return-any-highlight-objects/201472/2 "2019-09-30T12:27:52Z")

</div>

can you create a reproducible example with maybe a single document, where highlighting fails? plus index creation, plus mapping configuration?

That would be awesome!

---

<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:** [October 28, 2019, 12:27pm UTC](https://discuss.elastic.co/t/how-to-debug-when-the-search-result-doesnt-return-any-highlight-objects/201472/3 "2019-10-28T12:27:57Z")

</div>

Closed on October 28, 2019, 12:27pm UTC

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