Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
<img src="//i.stack.imgur.com/RUiNP.png" height="16" width="18" alt="" class="sponsor tag img">elasticsearch 如何在Elasticsearch中滚动多搜索查询的结果?_<img Src="//i.stack.imgur.com/RUiNP.png" Height="16" Width="18" Alt="" Class="sponsor Tag Img">elasticsearch - Fatal编程技术网 elasticsearch 如何在Elasticsearch中滚动多搜索查询的结果?,elasticsearch,elasticsearch" /> elasticsearch 如何在Elasticsearch中滚动多搜索查询的结果?,elasticsearch,elasticsearch" />

elasticsearch 如何在Elasticsearch中滚动多搜索查询的结果?

elasticsearch 如何在Elasticsearch中滚动多搜索查询的结果?,elasticsearch,elasticsearch,我尝试了以下两种方法来滚动elasticsearch多搜索查询的结果 方法#1 curl -XGET "http://localhost:9200/indexname/_msearch?scroll=10m" -d' { "type": "parent" } {"query": {"match_all": {}}} { "type": "child" } {"query": {"match_all": {}}} ' 方法#2 curl -XGET "http://localhost:9200/

我尝试了以下两种方法来滚动elasticsearch多搜索查询的结果

方法#1

curl -XGET "http://localhost:9200/indexname/_msearch?scroll=10m" -d'
{ "type": "parent" }
{"query": {"match_all": {}}}
{ "type": "child" }
{"query": {"match_all": {}}}
'
方法#2

curl -XGET "http://localhost:9200/indexname/_msearch" -d'
{ "type": "parent", "scroll": "10m" }
{"query": {"match_all": {}}}
{ "type": "child", "scroll": "10m" }
{"query": {"match_all": {}}}
'
这两种方法似乎都不起作用,因为它们在响应中不返回滚动ID。我能做什么?我做错了什么?
提前谢谢

从和大小中签出
-这些可以与每个查询一起使用。例如:

{ "type": "parent" }
{ "from":20,"size":10, "query": {...}}

你成功完成了吗?-在多搜索中滚动?