Skip to content
Snippets Groups Projects
Commit b116ebf6 authored by Aivaras Gotovskis's avatar Aivaras Gotovskis
Browse files

Add range filter doc.

parent 4248b77d
No related branches found
No related tags found
No related merge requests found
# Range Filter
> More info about range filter is in the [official elasticsearch docs][1]
Filters documents with fields that have terms within a certain range.
## Simple example
```JSON
{
"filter" : {
"range" : {
"age" : {
"gte": 10,
"lte": 20
}
}
}
}
```
And now the query via DSL:
```php
$rangeFilter = new RangeFilter('age', ['gte' => 10, 'lte' => 20]);
$search = new Search();
$search->addFilter($rangeFilter);
$queryArray = $search->toArray();
```
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-filter.html
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment