MLT API returns zero result when specifying mlt_fields, return results when not using mlt_fields


(Iwan Budi Kusnanto) #1

Hi All,

I was trying to use MLT API and confused with it's behavior when i
specify mlt_fields in URL query.

Here are my tests: (URL used is not the real URL)

  1. curl -XGET 'http://localhost:9200/twitter/tweet/1/_mlt?min_doc_freq=1'
    It returned array of result, as expected

  2. curl -XGET 'http://localhost:9200/twitter/tweet/1/_mlt?mlt_fields=bd,tag,content&min_doc_freq=1'

It returns zero result.
i am sure it was wrong because there are many documents which have
same 'bd' fields.
{"took":5,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}

  1. curl -XGET 'http://localhost:9200/twitter/tweet/1/_mlt?fields=bd,tag,content&min_doc_freq=1'

In this step, i changed 'mlt_fields' to 'fields'.
It returns array of result, different than (1)

My questions :

  • whats wrong with (2)? I am sure the URL query is right, because this
    is the URL mentioned in docs.
  • why (3) different thant(1)?

Thanks

--
Iwan Budi Kusnanto

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAG%2BDCt%2B8YoihDgOhHYwk0XPAMLYOvyqXnva%2B%2BukfM7sR59e6rg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(system) #2