Skip to content
Snippets Groups Projects
Commit e126ac81 authored by Mantas Simkus's avatar Mantas Simkus
Browse files

added WildcardQuery docs

parent 9df42a30
No related branches found
No related tags found
No related merge requests found
# Wildcard Query
\ No newline at end of file
# Wildcard query
> More info about Wildcard query is in the [official elasticsearch docs][1]
Matches documents that have fields matching a wildcard expression (not analyzed).
Lets take an example to write a wildcard query with Elasticsearch DSL.
```JSON
{
"wildcard" : {
"user" : {
"value" : "ki*y"
},
"boost" : 2.0
}
}
```
And now the query via DSL:
```php
$search = new Search();
$wildcard= new WildcardQuery('user', 'ki*y', ["boost" => 2.0]);
$search->addQuery($wildcard);
$queryArray = $search->toArray();
```
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-wildcard-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