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

Add term query doc.

parent 3902dd30
No related branches found
No related tags found
No related merge requests found
# Term Query
> More info about term query is in the [official elasticsearch docs][1]
The term query finds documents that contain the exact term specified in the inverted index.
## Simple example
```JSON
{
"term" : { "user" : "Kimchy" }
}
```
In DSL:
```php
$termQuery = new TermQuery('user', 'Kimchy');
$search = new Search();
$search->addQuery($termQuery);
$queryArray = $search->toArray();
```
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.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