# Search does not return all requested highlights

**URL:** <https://discuss.elastic.co/t/search-does-not-return-all-requested-highlights/57901>\
**Category:** Elasticsearch\
**Created:** [August 12, 2016, 8:43am UTC](https://discuss.elastic.co/t/search-does-not-return-all-requested-highlights/57901 "2016-08-12T08:43:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ulrik\_Pedersen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ulrik_pedersen/32/11352_2.png) [@Ulrik\_Pedersen](https://discuss.elastic.co/u/Ulrik_Pedersen)\
**Post date:** [August 12, 2016, 8:43am UTC](https://discuss.elastic.co/t/search-does-not-return-all-requested-highlights/57901/1 "2016-08-12T08:43:51Z")

</div>

I have a rather complicated search query - and the query itself acts as expected but I'm missing the last requested highlight in the end of the query - all highlights in the inner\_hits are returned as expected.

I have removed all other parts of the should clause for clarity - It's only the rather simple multi\_match I'm missing highlighing on:

```
	"query": {
		"filtered": {
			"query": {
				"bool": {
					"should": [
					  {
						 "multi_match": {
							"query": "manual calibrate PDT3310",
							"type": "cross_fields",
							"fields": ["doc_id", "doc_title", "project_no", "superseeded_by"]

						 }
					  }
					]
				}
			}
			"filter": {
				"bool": {
					"must": [
						[{
							"terms": {
								"lokation_beskriv": ["1200"]
							}
						}, {
							"terms": {
								"i2systemnumber": ["26"]
							}
						}]
					]
				}
			}
		}
	},
	"highlight": {
		"order": "score",
		"pre_tags": ["<mark>"],
		"post_tags": ["</mark>"],
		"fields": {
			"doc_title": [],
			"doc_id": [],
			"project_no": [],
			"superseeded_by": []
		}
	}
```

---

<div class="post-metadata">

**Author:** ![Ulrik\_Pedersen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ulrik_pedersen/32/11352_2.png) [@Ulrik\_Pedersen](https://discuss.elastic.co/u/Ulrik_Pedersen)\
**Post date:** [August 12, 2016, 12:33pm UTC](https://discuss.elastic.co/t/search-does-not-return-all-requested-highlights/57901/2 "2016-08-12T12:33:59Z")

</div>

Typo found....

The JSON format in the "fields" part was wrong...

Correct format should be with curly braces instead:

```
	"fields": {
		"doc_title": {},
		"doc_id": {},
		"project_no": {},
		"superseeded_by": {}
	}
```

---

<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, 10:28pm UTC](https://discuss.elastic.co/t/search-does-not-return-all-requested-highlights/57901/3 "2017-07-05T22:28:04Z")

</div>


