# Highlighter with MoreLikeThisQuery does not work

**URL:** <https://discuss.elastic.co/t/highlighter-with-morelikethisquery-does-not-work/10893>\
**Category:** Elasticsearch\
**Created:** [February 25, 2013, 10:27pm UTC](https://discuss.elastic.co/t/highlighter-with-morelikethisquery-does-not-work/10893 "2013-02-25T22:27:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mustafa\_Sener](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@Mustafa\_Sener](https://discuss.elastic.co/u/Mustafa_Sener)\
**Post date:** [February 25, 2013, 10:27pm UTC](https://discuss.elastic.co/t/highlighter-with-morelikethisquery-does-not-work/10893/1 "2013-02-25T22:27:17Z")

</div>

Hi,  
I have a more like this query which queries a field named text from ES. I  
configured a highlighter on the same field. It seems that search request  
return empty highlighted field map result.  
Anybody have any idea about this? By the way I use elasticsearch 0.20.2  
version.

Thanks...

--  
Mustafa Sener

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [February 26, 2013, 9:15am UTC](https://discuss.elastic.co/t/highlighter-with-morelikethisquery-does-not-work/10893/2 "2013-02-26T09:15:02Z")

</div>

Hi Mustafa,

What you are describing is correct, at the moment using  
the MoreLikeThisQuery with highlighting doesn't work.  
Work in Lucene has been done that fixes this issue. This was part of this  
Lucene issue:  
[https://issues.apache.org/jira/browse/LUCENE-4728](https://issues.apache.org/jira/browse/LUCENE-4728)

Once Lucene 4.2 has been released and we upgrade to Lucene 4.2 this issue  
should be fixed. At the moment we're on Lucene version 4.1 on the master  
branche.

Martijn

On 25 February 2013 23:27, Mustafa Sener [mustafa.sener@gmail.com](mailto:mustafa.sener@gmail.com) wrote:

> Hi,  
> I have a more like this query which queries a field named text from ES. I  
> configured a highlighter on the same field. It seems that search request  
> return empty highlighted field map result.  
> Anybody have any idea about this? By the way I use elasticsearch 0.20.2  
> version.
> 
> Thanks...
> 
> --  
> Mustafa Sener
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Met vriendelijke groet,

Martijn van Groningen

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Mustafa\_Sener](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@Mustafa\_Sener](https://discuss.elastic.co/u/Mustafa_Sener)\
**Post date:** [February 26, 2013, 3:21pm UTC](https://discuss.elastic.co/t/highlighter-with-morelikethisquery-does-not-work/10893/3 "2013-02-26T15:21:34Z")

</div>

Thanks...

On Tue, Feb 26, 2013 at 11:15 AM, Martijn v Groningen \<  
[martijn.v.groningen@gmail.com](mailto:martijn.v.groningen@gmail.com)\> wrote:

> Hi Mustafa,
> 
> What you are describing is correct, at the moment using  
> the MoreLikeThisQuery with highlighting doesn't work.  
> Work in Lucene has been done that fixes this issue. This was part of this  
> Lucene issue:  
> [[LUCENE-4728] Allow CommonTermsQuery to be highlighted - ASF JIRA](https://issues.apache.org/jira/browse/LUCENE-4728)
> 
> Once Lucene 4.2 has been released and we upgrade to Lucene 4.2 this issue  
> should be fixed. At the moment we're on Lucene version 4.1 on the master  
> branche.
> 
> Martijn
> 
> On 25 February 2013 23:27, Mustafa Sener [mustafa.sener@gmail.com](mailto:mustafa.sener@gmail.com) wrote:
> 
> > Hi,  
> > I have a more like this query which queries a field named text from ES. I  
> > configured a highlighter on the same field. It seems that search request  
> > return empty highlighted field map result.  
> > Anybody have any idea about this? By the way I use elasticsearch 0.20.2  
> > version.
> > 
> > Thanks...
> > 
> > --  
> > Mustafa Sener
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> Met vriendelijke groet,
> 
> Martijn van Groningen
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Mustafa Sener  
[www.ifountain.com](http://www.ifountain.com)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 2:49am UTC](https://discuss.elastic.co/t/highlighter-with-morelikethisquery-does-not-work/10893/4 "2017-07-06T02:49:29Z")

</div>


