# No highlights returned (ES 2.1, attachment-mapper 3.1.0)

**URL:** <https://discuss.elastic.co/t/no-highlights-returned-es-2-1-attachment-mapper-3-1-0/44546>\
**Category:** Elasticsearch\
**Created:** [March 16, 2016, 11:13am UTC](https://discuss.elastic.co/t/no-highlights-returned-es-2-1-attachment-mapper-3-1-0/44546 "2016-03-16T11:13:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Pocivalnik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_pocivalnik/32/56098_2.png) [@David\_Pocivalnik](https://discuss.elastic.co/u/David_Pocivalnik)\
**Post date:** [March 16, 2016, 11:13am UTC](https://discuss.elastic.co/t/no-highlights-returned-es-2-1-attachment-mapper-3-1-0/44546/1 "2016-03-16T11:13:30Z")

</div>

Hi,

I've used and had highlights before (via Java API), but lost it with some ES upgrade, can't remember which one though.

Now I'm using ES 2.1 with the corresponding attachments-mapper plug-in (3.1.0).

I followed the steps provided at [https://github.com/elastic/elasticsearch-mapper-attachments/tree/es-2.1](https://github.com/elastic/elasticsearch-mapper-attachments/tree/es-2.1) in order to make sure it's working at all, but the result I get is without any highlights (as opposed to the sample provided)

```
     {
  "took": 3,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "failed": 0
  },
  "hits": {
    "total": 1,
    "max_score": 1,
    "hits": [
      {
        "_index": "test",
        "_type": "person",
        "_id": "1",
        "_score": 1,
        "_source": {
          "file": "IkdvZCBTYXZlIHRoZSBRdWVlbiIgKGFsdGVybmF0aXZlbHkgIkdvZCBTYXZlIHRoZSBLaW5nIg=="
        }
      }
    ]
  }
}

```

Any idea what I'm missing here?

**EDIT:**

I just checked with ES 2.2.1 and corresponding attachment-mapper plug-in (bin/plugin install mapper-attachments) and followed the same steps, but the same result as before.

**EDIT2:**

The problem was that I had to use POST as method, not GET as it's said in the instructions I linked to above. (I'ved used the Firefox plug-in RestClient and the head-plug-in)

The problem I have now is that I want to do the following: Instead of having a match query I have a query\_string query, and with this one I'm getting the matching documents, but no highlights. I didn't try the match query within Java, but using the query\_string query within Java has the same behavior, I'm getting the matching docs, but no highlights.

```
{
  "fields": [],
  "query": {
    "query_string": {
      "query": "king queen"
    }
  },
  "highlight": {
    "fields": {
      "file.content": {
      }
    }
  }
}
```

---

<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 5, 2017, 11:07pm UTC](https://discuss.elastic.co/t/no-highlights-returned-es-2-1-attachment-mapper-3-1-0/44546/2 "2017-07-05T23:07:55Z")

</div>


