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

Add term filter doc.

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