# Kibana - does not highlight search results

**URL:** <https://discuss.elastic.co/t/kibana-does-not-highlight-search-results/312806>\
**Category:** Kibana\
**Created:** [August 24, 2022, 12:08pm UTC](https://discuss.elastic.co/t/kibana-does-not-highlight-search-results/312806 "2022-08-24T12:08:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elkuser1234](https://avatars.discourse-cdn.com/v4/letter/e/e19b73/32.png) [@elkuser1234](https://discuss.elastic.co/u/elkuser1234)\
**Post date:** [August 24, 2022, 12:08pm UTC](https://discuss.elastic.co/t/kibana-does-not-highlight-search-results/312806/1 "2022-08-24T12:08:41Z")

</div>

Hello

I don't understand why when searching through kibana, it doesn't highlight the result for the log\_message field.  
"log\_message" is the parsed "message" field, by grok.

 ![Zrzut ekranu 2022-08-24 135312](https://us1.discourse-cdn.com/elastic/original/3X/9/5/9596dd748e19594c87ea6fba67d6a5e2d3bb48b4.png)

I can only assume that the kibana is not looking around this field and therefore does not highlight it.

How to change it?

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [September 8, 2022, 1:29pm UTC](https://discuss.elastic.co/t/kibana-does-not-highlight-search-results/312806/2 "2022-09-08T13:29:26Z")

</div>

You can see what Kibana is exactly checking from the `Inspect` tool in the top right corner. There you will see the query and response from Elasticsearch.

My only idea is to confirm the mapping details from the `log_message` field. Is it maybe not indexed and only stored?

Take a look at this example just from the DevTools without creating a DataView or using Discover at all.

```auto
# Delete if exists
DELETE delete_text_keyword

# Define an index with a keyword and a non indexed text field
PUT delete_text_keyword
{
  "mappings": {
    "properties": {
      "text_field": {
        "type": "text",
        "index": false
      },
      "keyword_field": {"type": "keyword"}
    }
  }
}

# Index a couple of records
POST delete_text_keyword/_bulk
{"index" : {}}
{ "text_field": "hola", "keyword_field": "hola"}
{"index" : {}}
{ "text_field": "mundo", "keyword_field": "mundo"}

# Minimal search and highlight
GET delete_text_keyword/_search
{
  "_source": false,
  "query": {
    "bool": {
      "must": [
        {
          "query_string": {
            "query": "*hola*"
          }
        }
      ]
    }
  },
  "highlight": {
    "fields": {
      "*": {}
    }
  }
}

```

Only the `keyword` field is retrieved and highlighted

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/0/e0c9e803733baf5c4207af18375019db1a7f748f.png)

Sorry if this is super-evident but with the details provided is hard to go further.

---

<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 6, 2022, 1:30pm UTC](https://discuss.elastic.co/t/kibana-does-not-highlight-search-results/312806/3 "2022-10-06T13:30:08Z")

</div>

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