I found some problems in the implementation of the "more like this" queries on OpenSearch Serverless.
Following this tutorial https://opensearch.org/blog/similar-document-search/
but also this documentation from Elastic Search https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-mlt-query.html
I noticed that the queries based on the sentences works, but the queries based on ID it doesn't.
For example, a query like this works:
GET yourindex/_search
{
"query": {
"more_like_this" : {
"fields" : ["title", "description"],
"like" : "Once upon a time",
"min_term_freq" : 1,
"max_query_terms" : 12
}
}
}
but this query, a lot more useful and efficient, doesn't works. The results is always an empty set.
GET yourindex/_search
{
"query": {
"more_like_this": {
"fields": [ "title", "description" ],
"like": [
{
"_index": "imdb",
"_id": "1"
}
],
"min_term_freq": 1,
"max_query_terms": 12
}
}
}
any idea?