I am trying to achieve this multi search request on sense and plugin head but I am not able to get what could be the problem? sample on doc is for curl, I cant comprehend what is the exact difference.
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": {}
}
I am getting this error on sense. { "error": "JsonParseException[Unexpected end-of-input: expected close marker for OBJECT (from [Source: [B@48acbc4c; line: 1, column: 0])\\n at [Source: [B@48acbc4c; line: 1, column: 3]]", "status": 500 }
This is because of extra spaces. I got this error removed by removing extra space and next lines. In sense Run ctrl+I
twice to first indent and then un-indent the query.
Hope this will remove the error.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.