Problems with OpenSearch Serverless and More Like This queries

0

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?

asked a year ago91 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions