Could you help explain why the behavior is different between GET and POST? And advise how to make it work when using GET? Thanks in advance.
curl --location --request GET 'http://kibana.xxx.xxx.xx:5601/elasticsearch/_msearch'
--header 'Content-Type: application/x-ndjson'
--header 'kbn-version: 6.8.3'
--data-raw '{"index": "-xxx-"}
{"aggs":{"2":{"terms":{"field":"env_name","size":50,"order":{"_key":"asc"}}}},"size":0,"_source":{"excludes":},"stored_fields":["*"],"script_fields":{},"docvalue_fields":[{"field":"@timestamp","format":"date_time"},{"field":"timestamp","format":"date_time"}],"query":{"bool":{"must":[{"range":{"@timestamp":{"gte":1577669673076,"lte":1578274473076,"format":"epoch_millis"}}}],"filter":[{"match_all":{}},{"bool":{"filter":[{"bool":{"should":[{"bool":{"should":[{"match":{"env_name":"xxx"}}],"minimum_should_match":1}},{"bool":{"should":[{"match":{"location":"xxx"}}],"minimum_should_match":1}}],"minimum_should_match":1}},{"bool":{"should":[{"match_phrase":{"uri":"/xxx/xxx/xxx"}}],"minimum_should_match":1}}]}}],"should":,"must_not":}},"timeout":"30000ms"}
{
"statusCode": 404,
"error": "Not Found",
"message": "Not Found"
}
curl --location --request POST 'http://kibana.xxx.xxx.xx:5601/elasticsearch/_msearch'
--header 'Content-Type: application/x-ndjson'
--header 'kbn-version: 6.8.3'
--data-raw '{"index": "-xxx-"}
{"aggs":{"2":{"terms":{"field":"env_name","size":50,"order":{"_key":"asc"}}}},"size":0,"_source":{"excludes":},"stored_fields":["*"],"script_fields":{},"docvalue_fields":[{"field":"@timestamp","format":"date_time"},{"field":"timestamp","format":"date_time"}],"query":{"bool":{"must":[{"range":{"@timestamp":{"gte":1577669673076,"lte":1578274473076,"format":"epoch_millis"}}}],"filter":[{"match_all":{}},{"bool":{"filter":[{"bool":{"should":[{"bool":{"should":[{"match":{"env_name":"xxx"}}],"minimum_should_match":1}},{"bool":{"should":[{"match":{"location":"xxx"}}],"minimum_should_match":1}}],"minimum_should_match":1}},{"bool":{"should":[{"match_phrase":{"uri":"/xxx/xxx/xxx"}}],"minimum_should_match":1}}]}}],"should":,"must_not":}},"timeout":"30000ms"}
{
"responses": [
{
"took": 14,
"timed_out": false,
"_shards": {
"total": 7,
"successful": 7,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 525111,
"max_score": 0,
"hits":
},
"aggregations": {
"2": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": "xxx",
"doc_count": 682
},
...
]
}
},
"status": 200
}
]
}