I have tried to fire a silly request to ElastiSearch 5.1.1:
GET products/_search
{
**"from": -2**,
"size": 100,
"query": {
"match": {
"productName": "soy sauce"
}
},
"sort": [
{
"customerRating": {
"order": "desc"
}
},
"_score",
{
"price" : {
"order": "asc"
}
}
]
}
and got this:
{
"error": {
"root_cause": [],
"type": "reduce_search_phase_exception",
"reason": "[reduce] ",
"phase": "query",
"grouped": true,
"failed_shards": [],
"caused_by": {
"type": "null_pointer_exception",
"reason": null
}
},
"status": 503
}
I had expected a 400 (user error) and a meaningful error message, like e.g: from parameter cannot be negative.