MLT on keyword fields

Using Elasticsearch 5.3.

this query yields no results despite there being a bunch of docs with those tracks in them.
{
"from" : 0,
"size" : 10,
"query" : {
"more_like_this" : {
"fields" : ["tracks" ],
"like" : [
{
"doc":{
"tracks":[
"4niNP3ph6WyETO1j4ZgV0c",
"4AwKXevZmsTNa3KZVj3rzl"]
}
} ],
"min_term_freq" : 1
}
},
"sort" : [ {
"_score" : {
"order" : "desc"
}
}]
}

The tracks field is defined as
"tracks" : {
"type" : "keyword",
"doc_values" : false
}

We have a name field of type text which seems to return results in the mlt query. Do I need to change something else in the index? Is this a valid use of mlt?

Thanks and apologies as I am new to this forum.

Any thoughts here? Seems like mlt works on a text field but not a keyword field. Do we need doc_values or term_vectors to use this field in an mlt query? Any more info I can provide to get some insight here?

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