# MoreLikeThis and unified highlighter

**URL:** <https://discuss.elastic.co/t/morelikethis-and-unified-highlighter/97792>\
**Category:** Elasticsearch\
**Created:** [August 21, 2017, 3:40pm UTC](https://discuss.elastic.co/t/morelikethis-and-unified-highlighter/97792 "2017-08-21T15:40:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![philv](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@philv](https://discuss.elastic.co/u/philv)\
**Post date:** [August 21, 2017, 3:40pm UTC](https://discuss.elastic.co/t/morelikethis-and-unified-highlighter/97792/1 "2017-08-21T15:40:22Z")

</div>

When I use an MLT query and the unified highlighter I don't get highlighting. It works with the plain highlighter. I was just wondering whether the unified highlighter isn't yet meant to work with specialised queries such as MLT yet- or whether this is a bug. I'm on ES 5.5.0

Cheers,  
Phil

---

<div class="post-metadata">

**Author:** ![jimczi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jimczi/32/47985_2.png) [@jimczi](https://discuss.elastic.co/u/jimczi)\
**Post date:** [August 22, 2017, 7:16pm UTC](https://discuss.elastic.co/t/morelikethis-and-unified-highlighter/97792/2 "2017-08-22T19:16:37Z")

</div>

You are right, the `unified` highlighter does not handle MLT query correctly. The reason is that this highlighter rewrites query with an empty reader and the MLT query relies on index reader stats to build the Lucene query.  
It works with the `plain` highlighter but only if you set `min_doc_freq` to 1 so it's also a problem for other highlighters.  
Can you open an issue on github for this ? I am not sure if we'll be able to handle this query correctly but we should at least have an issue that explains why.

---

<div class="post-metadata">

**Author:** ![philv](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@philv](https://discuss.elastic.co/u/philv)\
**Post date:** [August 24, 2017, 9:43am UTC](https://discuss.elastic.co/t/morelikethis-and-unified-highlighter/97792/3 "2017-08-24T09:43:26Z")

</div>

Thanks. Issue raised: [https://github.com/elastic/elasticsearch/issues/26357](https://github.com/elastic/elasticsearch/issues/26357)

---

<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 21, 2017, 9:48am UTC](https://discuss.elastic.co/t/morelikethis-and-unified-highlighter/97792/4 "2017-09-21T09:48:28Z")

</div>

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