我试图在感觉和插件头上实现这个多搜索请求,但我无法得到什么问题?doc上的示例是curl,我无法理解究竟有什么区别.
POST _msearch?pretty=1
{"myIndex":"Product"}
{
"fields": [
"id",
"Name"
],
"query": {
"bool": {
"should": [
{
"query_string": {
"default_field": "_all",
"query": "key"
}
}
]
}
}
,
"from": 0,
"size": 5,
"sort": [],
"aggs": {}
}
{"myIndex":"Printer"}{
"fields": [
"id",
"Name"
],
"query": {
"bool": {
"must": [{
"has_child": {
"type": "Printer",
"query": {
"match": {
"Name": "key"
}
}
}
}]
}
}
,
"from": 0,
"size": 5,
"sort": [],
"aggs": {}
}
Run Code Online (Sandbox Code Playgroud)
感觉上我得到了这个错误.{"error":"JsonParseException [意外的输入结束:OBJECT的预期关闭标记(来自[来源:[B @ 48acbc4c;行:1,列:0])\n在[来源:[B @ 48acbc4c; line:1,column:3]]","status":500}
归档时间: |
|
查看次数: |
1178 次 |
最近记录: |