# ES returns query match but won't highlight

**URL:** <https://discuss.elastic.co/t/es-returns-query-match-but-wont-highlight/24297>\
**Category:** Elasticsearch\
**Created:** [June 25, 2015, 12:34am UTC](https://discuss.elastic.co/t/es-returns-query-match-but-wont-highlight/24297 "2015-06-25T00:34:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaybix](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@shaybix](https://discuss.elastic.co/u/shaybix)\
**Post date:** [June 25, 2015, 12:34am UTC](https://discuss.elastic.co/t/es-returns-query-match-but-wont-highlight/24297/1 "2015-06-25T00:34:26Z")

</div>

I have indexed Arabic books and when I query the content I get match, but no highlighting.

This is the query I ran (I modified the documentation example):

```
{
    "query" : {
        "match": {
           "page_body": "الله"
        }
    },
    "highlight" : {
        "fields" : {
            "_all" : { "pre_tags" : ["<em>"], "post_tags" : ["</em>"] }
        }
    }
}

```

Am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![shinyke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shinyke/32/587_2.png) [@shinyke](https://discuss.elastic.co/u/shinyke)\
**Post date:** [June 25, 2015, 1:49am UTC](https://discuss.elastic.co/t/es-returns-query-match-but-wont-highlight/24297/2 "2015-06-25T01:49:20Z")

</div>

Is it a problem about Arabic language compatible? Can you give more imformation like your indexed doc and the return of this query.

---

<div class="post-metadata">

**Author:** ![shaybix](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@shaybix](https://discuss.elastic.co/u/shaybix)\
**Post date:** [June 28, 2015, 6:38pm UTC](https://discuss.elastic.co/t/es-returns-query-match-but-wont-highlight/24297/3 "2015-06-28T18:38:00Z")

</div>

I managed to resolve the issue. I didn't know in my mappings I had to set the field I wanted to later on get highlights, the store as true.

```
"mappings" : {
    "pages" : {
        "_source" : { "enabled" : true },
        "properties" : {
            "page_body": {
                "type": "string",
                "index": "analyzed",
                "store": true
            },
            "book": {
                "properties": {
                    "category" : { "type" : "string", "index" : "not_analyzed" }
                    }
                }
            }
        }
    }
}

```

and then the query like this:

```
{
    "query" : {
        "match": {
           "page_body": "الله"
        }
    },
    "highlight" : {
        "fields" : {
            "page_body" : {
                "pre_tags" : ["</em>"],
                "post_tags": ["<em>"]
            }
        }
    }
}

```

Thanks for the quick reply.

---

<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:** [July 6, 2017, 12:04am UTC](https://discuss.elastic.co/t/es-returns-query-match-but-wont-highlight/24297/4 "2017-07-06T00:04:53Z")

</div>


