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

Add query filter doc.

parent ec3c0ee5
No related branches found
No related tags found
No related merge requests found
# Query Filter
> More info about query filter is in the [official elasticsearch docs][1]
Wraps any query to be used as a filter.
## Simple example
```JSON
{
"filter" : {
"query" : {
"query_string" : {
"query" : "this AND that OR thus"
}
}
}
}
```
And now the query via DSL:
```php
$queryStringQuery = new QueryStringQuery('this AND that OR thus');
$queryFilter = new QueryFilter($queryStringQuery);
$search = new Search();
$search->addFilter($queryFilter);
$queryArray = $search->toArray();
```
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-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