Im having a Problem with one query which throws that error:
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"[from] parameter cannot be negative"}],"type":"illegal_argument_exception","reason":"[from] parameter cannot be negative"},"status":400} {"userId":8260,"email":"xxx@xx.de","exception":"[object] (Elasticsearch\\Common\\Exceptions\\BadRequest400Exception(code: 400): {\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"[from] parameter cannot be negative\"}],\"type\":\"illegal_argument_exception\",\"reason\":\"[from] parameter cannot be negative\"},\"status\":400} at /var/www/zwp-online.info/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:636)
but the i dont understand where to find the from
parameter its just one query all the other ones are valid and working perfect my query is like followed:
{
"size": 12,
"sort": [
{
"year": {"order": "desc"}
},
{
"issue_id": {"order": "desc"}
},
{
"_score": {"order": "desc"}
}
],
"query": {
"function_score": {
"query": {
"bool": {
"must": [
{
"multi_match": {
"query": "voco",
"type": "phrase_prefix",
"fields": [
"title^10",
"author.unstemmed^25",
"body",
"description"
]
}
},
{
"range": {
"year": {
"gte": 1970,
"lte": 2024,
"format": "Y"
}
}
},
{
"exists": {
"field": "title"
}
}
],
"should": [],
"minimum_should_match": 0
}
},
"score_mode": "sum",
"boost_mode": "sum",
"functions": [
{
"filter": {
"match": {
"author": "voco"
}
},
"weight": 100
}
]
}
}
}
The Error comes only if i put in the voco
as searchterm, as soon as is use voco gm
or anthing like that it works again.
IF somebody have an idea why the error is being throwed would be amazing. Im using ELasticsearch with laravel and php. so in the request the parameters are set and gte
and lte
is also always set.