More_like_this query with a filter
If you want to do a more like this query and filter beforehand, you should use a bool query with filter clause (Elasticsearchversion > 2.0)
POST /testucb/docs/_search{ "size": 1702, "fields": [ "SequentialId", "Category", "PRIMARY_CONTENT_EN" ], "query": { "bool": { "must": [ { "more_like_this": { "fields": [ "PRIMARY_CONTENT_EN" ], "like": [ <-----------834 _ids goes here ----> ], "min_term_freq": 1, "min_doc_freq": 1, "max_query_terms": 15, "min_word_len": 3, "stop_words": [], "boost": 2, "include": false } } ], "filter": { "range": { "SequentialId": { "gte": 851, "lte": 1702 } } } } }}
If you use an older version of elasticsearch, you should use the filtered query instead