# Query throws error just by one term other working great

**URL:** <https://discuss.elastic.co/t/query-throws-error-just-by-one-term-other-working-great/358115>\
**Category:** Elasticsearch\
**Created:** [April 24, 2024, 11:12am UTC](https://discuss.elastic.co/t/query-throws-error-just-by-one-term-other-working-great/358115 "2024-04-24T11:12:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![libertey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/libertey/32/126905_2.png) [@libertey](https://discuss.elastic.co/u/libertey)\
**Post date:** [April 24, 2024, 11:12am UTC](https://discuss.elastic.co/t/query-throws-error-just-by-one-term-other-working-great/358115/1 "2024-04-24T11:12:20Z")

</div>

Im having a Problem with one query which throws that error:

```auto
 {"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:

```auto
{
	"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.
