# More Like This (mlt) vs query\_string or multi\_match

**URL:** <https://discuss.elastic.co/t/more-like-this-mlt-vs-query-string-or-multi-match/9995>\
**Category:** Elasticsearch\
**Created:** [December 7, 2012, 10:24pm UTC](https://discuss.elastic.co/t/more-like-this-mlt-vs-query-string-or-multi-match/9995 "2012-12-07T22:24:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Mike](https://discuss.elastic.co/u/Mike)\
**Post date:** [December 7, 2012, 10:24pm UTC](https://discuss.elastic.co/t/more-like-this-mlt-vs-query-string-or-multi-match/9995/1 "2012-12-07T22:24:54Z")

</div>

What is the difference between mlt and query\_string/multi\_match queries?

Besides the fact that query\_string goes through the query parsing process,  
I don't see how More Like This differs from these 2 query types. All 3 of  
them allow me to specify multiple fields to search against, and boost the  
fields differently. Am I missing something that mlt does differently for  
scoring under the covers which query\_string and multi\_match do differently?

--

---

<div class="post-metadata">

**Author:** ![Anil\_Rhemtulla](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@Anil\_Rhemtulla](https://discuss.elastic.co/u/Anil_Rhemtulla)\
**Post date:** [December 8, 2012, 5:49am UTC](https://discuss.elastic.co/t/more-like-this-mlt-vs-query-string-or-multi-match/9995/2 "2012-12-08T05:49:26Z")

</div>

Still learning about all this myself, but I do know the MLT is quite  
different as it looks at terms in the source document instead of a a  
query\_string which would only search on a few words of the document  
(assuming you have a non-trivial document).

This might help:  
[http://cephas.net/blog/2008/03/30/how-morelikethis-works-in-lucene/](http://cephas.net/blog/2008/03/30/how-morelikethis-works-in-lucene/)

On Friday, December 7, 2012 2:24:54 PM UTC-8, Mike wrote:

> What is the difference between mlt and query\_string/multi\_match queries?
> 
> Besides the fact that query\_string goes through the query parsing process,  
> I don't see how More Like This differs from these 2 query types. All 3 of  
> them allow me to specify multiple fields to search against, and boost the  
> fields differently. Am I missing something that mlt does differently for  
> scoring under the covers which query\_string and multi\_match do differently?

--

---

<div class="post-metadata">

**Author:** ![Mike](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Mike](https://discuss.elastic.co/u/Mike)\
**Post date:** [December 10, 2012, 4:58pm UTC](https://discuss.elastic.co/t/more-like-this-mlt-vs-query-string-or-multi-match/9995/3 "2012-12-10T16:58:07Z")

</div>

So are you saying that MLT used tf\*idf for relevance scoring,  
while query\_string & multi\_match just check for the existance of the terms  
like in a boolean query for scoring?

I found this in the group search though, where Shay says that MLT is  
essentially just boolean query with all the terms in the should clause.  
[https://groups.google.com/d/msg/elasticsearch/QVTWA48wxcc/6sOS6huIip8J](https://groups.google.com/d/msg/elasticsearch/QVTWA48wxcc/6sOS6huIip8J)

Isn't that essentially what the other 2 queries do when you have the  
default operator set to OR? If MLT is the only query that uses tf\*idf,  
then what does query\_string/multi\_match do for scoring that is different?

On Saturday, December 8, 2012 12:49:26 AM UTC-5, Anil Rhemtulla wrote:

> Still learning about all this myself, but I do know the MLT is quite  
> different as it looks at terms in the source document instead of a a  
> query\_string which would only search on a few words of the document  
> (assuming you have a non-trivial document).
> 
> This might help:  
> [How MoreLikeThis Works in Lucene | Aaron Johnson](http://cephas.net/blog/2008/03/30/how-morelikethis-works-in-lucene/)
> 
> On Friday, December 7, 2012 2:24:54 PM UTC-8, Mike wrote:
> 
> > What is the difference between mlt and query\_string/multi\_match queries?
> > 
> > Besides the fact that query\_string goes through the query parsing  
> > process, I don't see how More Like This differs from these 2 query types.  
> > All 3 of them allow me to specify multiple fields to search against, and  
> > boost the fields differently. Am I missing something that mlt does  
> > differently for scoring under the covers which query\_string and multi\_match  
> > do differently?

--

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [December 11, 2012, 3:36pm UTC](https://discuss.elastic.co/t/more-like-this-mlt-vs-query-string-or-multi-match/9995/4 "2012-12-11T15:36:16Z")

</div>

MLT, query\_string and multi\_match are all using tf\*idf. And as Shay said  
you can think of MLT as a big boolean query. MLT just has a lot of "knobs"  
you can tweak that affect the resulted boolean query. You can remove very  
frequent and rare terms from your query, set boost for terms occurring in  
your query multiple times, set how many terms should match in terms  
of percentage of the query text and so on.

On Monday, December 10, 2012 11:58:07 AM UTC-5, Mike wrote:

> So are you saying that MLT used tf\*idf for relevance scoring,  
> while query\_string & multi\_match just check for the existance of the terms  
> like in a boolean query for scoring?
> 
> I found this in the group search though, where Shay says that MLT is  
> essentially just boolean query with all the terms in the should clause.  
> [https://groups.google.com/d/msg/elasticsearch/QVTWA48wxcc/6sOS6huIip8J](https://groups.google.com/d/msg/elasticsearch/QVTWA48wxcc/6sOS6huIip8J)
> 
> Isn't that essentially what the other 2 queries do when you have the  
> default operator set to OR? If MLT is the only query that uses tf\*idf,  
> then what does query\_string/multi\_match do for scoring that is different?
> 
> On Saturday, December 8, 2012 12:49:26 AM UTC-5, Anil Rhemtulla wrote:
> 
> > Still learning about all this myself, but I do know the MLT is quite  
> > different as it looks at terms in the source document instead of a a  
> > query\_string which would only search on a few words of the document  
> > (assuming you have a non-trivial document).
> > 
> > This might help:  
> > [How MoreLikeThis Works in Lucene | Aaron Johnson](http://cephas.net/blog/2008/03/30/how-morelikethis-works-in-lucene/)
> > 
> > On Friday, December 7, 2012 2:24:54 PM UTC-8, Mike wrote:
> > 
> > > What is the difference between mlt and query\_string/multi\_match queries?
> > > 
> > > Besides the fact that query\_string goes through the query parsing  
> > > process, I don't see how More Like This differs from these 2 query types.  
> > > All 3 of them allow me to specify multiple fields to search against, and  
> > > boost the fields differently. Am I missing something that mlt does  
> > > differently for scoring under the covers which query\_string and multi\_match  
> > > do differently?

--

---

<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:00am UTC](https://discuss.elastic.co/t/more-like-this-mlt-vs-query-string-or-multi-match/9995/5 "2017-07-06T03:00:16Z")

</div>


