2

在“More like this query”中,我们不仅可以指定文档,还可以指定其他一些文本:

{
"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

}

是否可以像上面的示例一样使用 Spring Data 和 Elasticsearch Template 添加一组文档和一大块要查询的文本?阅读https://docs.spring.io/spring-data/elasticsearch/docs/current/api/似乎 MoreLikeThisQuery 类不支持,对吗?是进行该查询的唯一方法吗?

4

0 回答 0