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

Add prefix query doc.

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