# Elasticsearch highlight wrong response

**URL:** <https://discuss.elastic.co/t/elasticsearch-highlight-wrong-response/97235>\
**Category:** Elasticsearch\
**Created:** [August 16, 2017, 10:40am UTC](https://discuss.elastic.co/t/elasticsearch-highlight-wrong-response/97235 "2017-08-16T10:40:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vcgoyo](https://avatars.discourse-cdn.com/v4/letter/v/e19adc/32.png) [@Vcgoyo](https://discuss.elastic.co/u/Vcgoyo)\
**Post date:** [August 16, 2017, 10:40am UTC](https://discuss.elastic.co/t/elasticsearch-highlight-wrong-response/97235/1 "2017-08-16T10:40:05Z")

</div>

ElasticSearch 5.4.0

I have a problem about the highlight

and the searchParse

```
{
  "from": 0,
  "size": 10,
  "query": {
    "query_string": {
      "query": "name:Cam",
      "fields": [],
      "use_dis_max": true,
      "tie_breaker": 0,
      "default_operator": "or",
      "auto_generate_phrase_queries": false,
      "max_determinized_states": 10000,
      "enable_position_increments": true,
      "fuzziness": "AUTO",
      "fuzzy_prefix_length": 0,
      "fuzzy_max_expansions": 50,
      "phrase_slop": 0,
      "escape": false,
      "split_on_whitespace": true,
      "boost": 1
    }
  },
  "highlight": {
    "pre_tags": [
      "<font color=\"red\">"
    ],
    "post_tags": [
      "</font>"
    ],
    "fields": {
      "name": {
      }
    }
  }
}

```

and the response

```
"hits": {
"total": 149538,
"max_score": 5.1039014,
"hits": [
{
"_index": "index-3.2.0",
"_type": "CAMERA_INFO",
"_id": "33010801001310011373",
"_score": 5.1039014,
"_source": {
    .....
   "name": "Camera 16",
    .....
},
"highlight": {
    "name": [
        "<font color="red">C</font><font color="red">a</font><font color="red">m</font>er<font 
        color="red">Camera</font> 16"
   ]
}
}

```

you can see the response highlight field "name" ,it should be

```
<font color="red">C</font><font color="red">a</font><font color="red">m</font>era 16

```

but the result is

```
<font color="red">C</font><font color="red">a</font><font color="red">m</font>er<font 
        color="red">Camera</font> 16

```

where is the `<font color="red">Camera</font>` come from? and where is my "a", why the `<font color="red">Camera</font>` replace the `a`

---

<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:** [September 13, 2017, 10:40am UTC](https://discuss.elastic.co/t/elasticsearch-highlight-wrong-response/97235/2 "2017-09-13T10:40:07Z")

</div>

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