# How to debug/analyze a morelikethis query?

**URL:** <https://discuss.elastic.co/t/how-to-debug-analyze-a-morelikethis-query/7594>\
**Category:** Elasticsearch\
**Created:** [May 8, 2012, 9:35am UTC](https://discuss.elastic.co/t/how-to-debug-analyze-a-morelikethis-query/7594 "2012-05-08T09:35:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinhphu1711](https://avatars.discourse-cdn.com/v4/letter/v/a88e4f/32.png) [@vinhphu1711](https://discuss.elastic.co/u/vinhphu1711)\
**Post date:** [May 8, 2012, 9:35am UTC](https://discuss.elastic.co/t/how-to-debug-analyze-a-morelikethis-query/7594/1 "2012-05-08T09:35:50Z")

</div>

Hi,  
I'm playing with the More Like This query  
[http://www.elasticsearch.org/guide/reference/query-dsl/mlt-query.html](http://www.elasticsearch.org/guide/reference/query-dsl/mlt-query.html)  
.  
There're quite a couple of parameters to tune, mainly to select the  
right tokens in the source document to be compared against the rest in  
the index.

I'm curious to see if there's any convenient way to look at the tokens  
of the "like text" after analyzed by ElasticSeach (i.e: after stop  
word removal, tokenizing, tf idf filtering...). The idea is similar to  
the Admin Analyze API: [http://www.elasticsearch.org/guide/reference/api/admin-indices-analyze.html](http://www.elasticsearch.org/guide/reference/api/admin-indices-analyze.html)

This would be very helpful for one to tweak the parameters in a  
MoreLikeThis query. Is there already such an API for MoreLikeThis ?

Thank you in advance.

LTVP

---

<div class="post-metadata">

**Author:** ![vinhphu1711](https://avatars.discourse-cdn.com/v4/letter/v/a88e4f/32.png) [@vinhphu1711](https://discuss.elastic.co/u/vinhphu1711)\
**Post date:** [May 8, 2012, 10:05am UTC](https://discuss.elastic.co/t/how-to-debug-analyze-a-morelikethis-query/7594/2 "2012-05-08T10:05:17Z")

</div>

After searching a while, I saw this ticket: [Implement "interesting terms" in More Like This handler · Issue #1412 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1412)  
It's exactly what I'd like to ask for.

LTVP

On May 8, 2012, at 5:35 PM, Phu Le wrote:

> Hi,  
> I'm playing with the More Like This query  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/query-dsl/mlt-query.html)  
> .  
> There're quite a couple of parameters to tune, mainly to select the  
> right tokens in the source document to be compared against the rest in  
> the index.
> 
> I'm curious to see if there's any convenient way to look at the tokens  
> of the "like text" after analyzed by ElasticSeach (i.e: after stop  
> word removal, tokenizing, tf idf filtering...). The idea is similar to  
> the Admin Analyze API: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-analyze.html)
> 
> This would be very helpful for one to tweak the parameters in a  
> MoreLikeThis query. Is there already such an API for MoreLikeThis ?
> 
> Thank you in advance.
> 
> LTVP

---

<div class="post-metadata">

**Author:** ![vinhphu1711](https://avatars.discourse-cdn.com/v4/letter/v/a88e4f/32.png) [@vinhphu1711](https://discuss.elastic.co/u/vinhphu1711)\
**Post date:** [June 28, 2012, 4:28am UTC](https://discuss.elastic.co/t/how-to-debug-analyze-a-morelikethis-query/7594/3 "2012-06-28T04:28:59Z")

</div>

Hi, any update on that? Or do you have any idea of an efficient way to debug and tweak a morelikethis query?

On May 8, 2012, at 6:05 PM, Phu Le wrote:

> After searching a while, I saw this ticket: [Implement "interesting terms" in More Like This handler · Issue #1412 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1412)  
> It's exactly what I'd like to ask for.
> 
> LTVP
> 
> On May 8, 2012, at 5:35 PM, Phu Le wrote:
> 
> > Hi,  
> > I'm playing with the More Like This query  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/query-dsl/mlt-query.html)  
> > .  
> > There're quite a couple of parameters to tune, mainly to select the  
> > right tokens in the source document to be compared against the rest in  
> > the index.
> > 
> > I'm curious to see if there's any convenient way to look at the tokens  
> > of the "like text" after analyzed by ElasticSeach (i.e: after stop  
> > word removal, tokenizing, tf idf filtering...). The idea is similar to  
> > the Admin Analyze API: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-analyze.html)
> > 
> > This would be very helpful for one to tweak the parameters in a  
> > MoreLikeThis query. Is there already such an API for MoreLikeThis ?
> > 
> > Thank you in advance.
> > 
> > LTVP

---

<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, 3:22am UTC](https://discuss.elastic.co/t/how-to-debug-analyze-a-morelikethis-query/7594/4 "2017-07-06T03:22:16Z")

</div>


