子查询ElasticSearch

mo49yndu  于 2021-06-14  发布在  ElasticSearch
关注(0)|答案(0)|浏览(240)

我编写了一个es查询,它首先匹配电影名称并返回内容id(1-1-1000017),然后编写了另一个查询来获取与上述id相关的数据
我们可以合并两者并编写一个elasticsearch查询吗?
示例查询:

GET /movies/_search?filter_path=hits.hits._source
{
  "_source": "contentId",
  "query": {
  "match_phrase_prefix": {
     "contentData.M.title.S": "dabang"
   }
   } 
 }

GET /movies/_search?size=1000
{
 "query": {
  "term": {
     "contentId.S.keyword": "1-1-1000017"
  }
  }
 }

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题