# Why are there many highlight tags?

**URL:** <https://discuss.elastic.co/t/why-are-there-many-highlight-tags/53993>\
**Category:** Elasticsearch\
**Created:** [June 27, 2016, 4:50am UTC](https://discuss.elastic.co/t/why-are-there-many-highlight-tags/53993 "2016-06-27T04:50:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KajMagnus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kajmagnus/32/142465_2.png) [@KajMagnus](https://discuss.elastic.co/u/KajMagnus)\
**Post date:** [June 27, 2016, 4:50am UTC](https://discuss.elastic.co/t/why-are-there-many-highlight-tags/53993/1 "2016-06-27T04:50:21Z")

</div>

Hi, when specifying search result highlight tags, one specifies _many_ tags not just one:

```
public HB preTags(String... preTags) { ...

```

(in org/elasticsearch/search/highlight/AbstractHighlighterBuilder.java)

Why many tags? Are the first ones used for good matches, the later ones for worse matches? — However I found this issue, but it's _not_ marked as fixed: [https://github.com/elastic/elasticsearch/issues/12326](https://github.com/elastic/elasticsearch/issues/12326) _"Intensity Highlighting"_.

In my app, E.S. has so far only used the very first highlight tag, although I've specified 7 tags. I'm getting the impression that the 6 last tags aren't used for anything.

I'm using Elastic Search 5 alpha 3.

Best regards,  
KajMagnus

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 27, 2016, 5:15am UTC](https://discuss.elastic.co/t/why-are-there-many-highlight-tags/53993/2 "2016-06-27T05:15:57Z")

</div>

Apparently it's used by the Fast Vector Highlighter only.

See [https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-highlighting.html#tags](https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-highlighting.html#tags)

---

<div class="post-metadata">

**Author:** ![KajMagnus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kajmagnus/32/142465_2.png) [@KajMagnus](https://discuss.elastic.co/u/KajMagnus)\
**Post date:** [June 27, 2016, 6:09am UTC](https://discuss.elastic.co/t/why-are-there-many-highlight-tags/53993/3 "2016-06-27T06:09:50Z")

</div>

Thanks

---

<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:40pm UTC](https://discuss.elastic.co/t/why-are-there-many-highlight-tags/53993/4 "2017-07-05T22:40:21Z")

</div>


