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

Add terms filter doc.

parent efe25a63
No related branches found
No related tags found
No related merge requests found
# Terms Filter
> More info about terms filter is in the [official elasticsearch docs][1]
Filters documents that have fields that match any of the provided terms.
## Simple example
```JSON
{
"filter" : {
"terms" : { "user" : ["kimchy", "elasticsearch"]}
}
}
```
And now the query via DSL:
```php
$termsFilter = new TermsFilter('user', ['kimchy', 'elasticsearch']);
$search = new Search();
$search->addFilter($termsFilter);
$queryArray = $search->toArray();
```
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-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