File manager - Edit - /var/www/payraty/helpdesk/vendor/handcraftedinthealps/elasticsearch-dsl/docs/Query/TermLevel/Prefix.md
Back
# 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
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings