# "more like this" vs. mlt

**URL:** <https://discuss.elastic.co/t/more-like-this-vs-mlt/18992>\
**Category:** Elasticsearch\
**Created:** [July 30, 2014, 11:32pm UTC](https://discuss.elastic.co/t/more-like-this-vs-mlt/18992 "2014-07-30T23:32:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Li](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/peter_li/32/109125_2.png) [@Peter\_Li](https://discuss.elastic.co/u/Peter_Li)\
**Post date:** [July 30, 2014, 11:32pm UTC](https://discuss.elastic.co/t/more-like-this-vs-mlt/18992/1 "2014-07-30T23:32:31Z")

</div>

I ran a query:

curl -XGET  
"$url/ease/RadiologyResult/90642/\_mlt?routing=07009409&mlt\_fields=Observation.Value&min\_term\_freq=1&min\_doc\_freq=1&pretty"

It worked and returned several documents. But if I ran this:

curl -XGET "$url/ease/RadiologyResult/\_search?routing=07009409&pretty" -d '  
{

```
"query" : {
    "more_like_this" : {
        "fields": [
            "Observation.Value"
        ],
        "ids" : ["90642"]
   }

```

}  
}'

It returned nothing. Is there something I am missing ?

Thanks in advance.

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ffa73983-ce04-4fd3-9786-ee09d3248d83%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ffa73983-ce04-4fd3-9786-ee09d3248d83%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vineeth_mohan_2/32/747_2.png) [@vineeth\_mohan\_2](https://discuss.elastic.co/u/vineeth_mohan_2)\
**Post date:** [July 31, 2014, 4:03am UTC](https://discuss.elastic.co/t/more-like-this-vs-mlt/18992/2 "2014-07-31T04:03:08Z")

</div>

Hello Peter ,

You have set these variable for the API and not the query , that is why its  
working - min\_term\_freq=1 , min\_doc\_freq=1

Thanks  
Vineeth

On Thu, Jul 31, 2014 at 5:02 AM, Peter Li [jenli.peter@gmail.com](mailto:jenli.peter@gmail.com) wrote:

> I ran a query:
> 
> curl -XGET  
> "$url/ease/RadiologyResult/90642/\_mlt?routing=07009409&mlt\_fields=Observation.Value&min\_term\_freq=1&min\_doc\_freq=1&pretty"
> 
> It worked and returned several documents. But if I ran this:
> 
> curl -XGET "$url/ease/RadiologyResult/\_search?routing=07009409&pretty" -d '  
> {
> 
> ```
> "query" : {
> "more_like_this" : {
> "fields": [
> "Observation.Value"
> ],
> "ids" : ["90642"]
> }
> 
> ```
> 
> }  
> }'
> 
> It returned nothing. Is there something I am missing ?
> 
> Thanks in advance.
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/ffa73983-ce04-4fd3-9786-ee09d3248d83%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ffa73983-ce04-4fd3-9786-ee09d3248d83%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/ffa73983-ce04-4fd3-9786-ee09d3248d83%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/ffa73983-ce04-4fd3-9786-ee09d3248d83%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGdPd5kGyJk%3DXn%2BNRj8bKxqOgTgQ3\_U1p6D%3DA%3DEqih1u2v9eYQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGdPd5kGyJk%3DXn%2BNRj8bKxqOgTgQ3_U1p6D%3DA%3DEqih1u2v9eYQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Peter\_Li](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/peter_li/32/109125_2.png) [@Peter\_Li](https://discuss.elastic.co/u/Peter_Li)\
**Post date:** [July 31, 2014, 2:07pm UTC](https://discuss.elastic.co/t/more-like-this-vs-mlt/18992/3 "2014-07-31T14:07:45Z")

</div>

Sorry, I copied and pasted the wrong query. It still didn't work with the  
min\* clauses in the body:

curl -XGET "$url/ease/RadiologyResult/\_search?routing=07009409&pretty" -d '  
{

```
"query" : {
    "more_like_this" : {
        "fields": [
            "Observation.Value"
        ],
        "ids" : ["90642"],
        "min_term_freq" : 1,
        "min_doc_freq" : 1
    }
}

```

}'

This returned nothing either.

On Wednesday, July 30, 2014 11:03:28 PM UTC-5, vineeth mohan wrote:

> Hello Peter ,
> 
> You have set these variable for the API and not the query , that is why  
> its working - min\_term\_freq=1 , min\_doc\_freq=1
> 
> Thanks  
> Vineeth
> 
> On Thu, Jul 31, 2014 at 5:02 AM, Peter Li \<[jenli...@gmail.com](mailto:jenli...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > I ran a query:
> > 
> > curl -XGET  
> > "$url/ease/RadiologyResult/90642/\_mlt?routing=07009409&mlt\_fields=Observation.Value&min\_term\_freq=1&min\_doc\_freq=1&pretty"
> > 
> > It worked and returned several documents. But if I ran this:
> > 
> > curl -XGET "$url/ease/RadiologyResult/\_search?routing=07009409&pretty" -d  
> > '  
> > {
> > 
> > ```
> > "query" : {
> > "more_like_this" : {
> > "fields": [
> > "Observation.Value"
> > ],
> > "ids" : ["90642"]
> > }
> > 
> > ```
> > 
> > }  
> > }'
> > 
> > It returned nothing. Is there something I am missing ?
> > 
> > Thanks in advance.
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/ffa73983-ce04-4fd3-9786-ee09d3248d83%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ffa73983-ce04-4fd3-9786-ee09d3248d83%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/ffa73983-ce04-4fd3-9786-ee09d3248d83%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/ffa73983-ce04-4fd3-9786-ee09d3248d83%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3a47fc16-cc0d-4871-8ea6-0287635fa66e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3a47fc16-cc0d-4871-8ea6-0287635fa66e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:11am UTC](https://discuss.elastic.co/t/more-like-this-vs-mlt/18992/4 "2017-07-06T01:11:58Z")

</div>


