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

Add terms query doc.

parent 5c9d15e3
No related branches found
No related tags found
No related merge requests found
# Terms Query
> More info about terms query is in the [official elasticsearch docs][1]
A query that match on any of the provided terms.
## Simple example
```JSON
{
"terms" : {
"tags" : [ "blue", "pill" ],
"minimum_should_match" : 1
}
}
```
In DSL:
```php
$termsQuery = new TermsQuery(
'tags',
['blue', 'pill'],
['minimum_should_match' => 1]
);
$search = new Search();
$search->addQuery($termsQuery);
$queryArray = $search->toArray();
```
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-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