From e126ac814b7cce59c526c35261d7bf03e747218b Mon Sep 17 00:00:00 2001 From: Mantas Simkus <mantas.simkus@ongr.io> Date: Thu, 6 Aug 2015 11:26:15 +0300 Subject: [PATCH] added WildcardQuery docs --- docs/Query/Wildcard.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/docs/Query/Wildcard.md b/docs/Query/Wildcard.md index 4c646c5..e73500b 100644 --- a/docs/Query/Wildcard.md +++ b/docs/Query/Wildcard.md @@ -1 +1,32 @@ -# 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 -- GitLab