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

Add prefix filter doc.

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