2

In "More like this query" we can specify not only documents, but some other text:

{
"more_like_this" : {
"fields" : ["title", "description"],
"like" : [
{
    "_index" : "imdb",
    "_type" : "movies",
    "_id" : "1"
},
"and potentially some more text here as well"
],
"min_term_freq" : 1,
"max_query_terms" : 12

}

Is it possible using Spring Data and Elasticsearch Template to add a set of documents and a chunk of text to query like the example above? Reading https://docs.spring.io/spring-data/elasticsearch/docs/current/api/ it seems that MoreLikeThisQuery class does not suppport that, Am I right? Is the only way to make that query?

italktothewind
  • 1,950
  • 2
  • 28
  • 55

0 Answers0