Morelikethis query equivalent of deprecated morelikethis api request?

I am preparing an elasticsearch upgrade from 1.6x to 5.x. To get rid of using the deprecated morelikethis api, i am trying to use the morelikethis search query, but it gives me different results (number of documents, scoring):

Morelikethis api:

POST /collection/article/f82670e7af2bd09fb3bc2a78e09c7625/_mlt?mlt_fields=title,tags,intro&min_doc_freq=1&include=true&min_term_freq=1&max_query_terms=7&min_word_length=4&stop_words='de','het','een'

{ "from" : 0, "size" : 10, "filter" : { "and" : [ { "range" : { "pubdate" : { "from" : "20170228T000000.000+0000", "to" : "20170304T000000.000+0000"}} } ]} }

Morelikethis query:

POST /collection/article/_search

{"from" : 0,"size" : 10,"query": { "more_like_this" : { "fields" : ["title","tags","intro"], "docs" : [ { "_index" : "collection", "_type" : "article", "_id" : "f82670e7af2bd09fb3bc2a78e09c7625" } ], "min_term_freq" : 1, "min_word_length" : 4, "min_doc_freq" : 1, "max_query_terms" : 7, "include" : true, "stop_words" :["de","het","een"] }} ,"filter" : { "bool": { "must" : [ { "range" : { "pubdate" : { "from" : "20170228T000000.000+0000", "to" : "20170304T000000.000+0000"}} } ]}} }

Anyone have an idea what i'm doing wrong?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.