RequestError(400, u'parsing_exception', u'bool query does not support [sort]')
code:
error format:
{
"query":{
"bool":{
"must":{},
"filter":{},
"sort":[]
}
}
}
right format:
{
"query":{
"bool":{
"must":{},
"filter":{}
}
},
"sort":[]
}
bool
query is a compound query method. sort
cannot be included in bool
query, and sort should be placed on the same layer as query.
Why should the sort
parameter be placed in the same layer as the query? Because the sort parameter sorts the results.
RequestError(400, u'parsing_exception', u'[sort] query malformed, no start_object after query name')
From [sort] query malformed
, we speculate that there should be a problem with the constructed json format, check the json format