是否可以在多搜索api(_msearch)请求中使用已注册的搜索模板? 如果是这样,怎么样?
我尝试在一个正文中提供以下查询。
POST /_msearch
{"index":"index1","type":"type1"}
{"template":{"id":"template_1"},"params":{"a":1, "b":2}}
但这会导致错误:
Parse Failure [No parser for element [template]]
我尝试在查询中包装所有内容:
POST /_msearch
{"index":"index1","type":"type1"}
{"query":{"template":{"id":"template_1"},"params":{"a":1, "b":2}}}
并发布到_msearch / template,但这些都没有。
提前致谢