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

Add regexp query doc.

parent b116ebf6
No related branches found
No related tags found
No related merge requests found
# Regexp Query
> More info about regexp query is in the [official elasticsearch docs][1]
The regexp query allows you to use regular expression term queries.
## Simple example
```JSON
{
"filter": {
"regexp":{
"name.first" : "s.*y"
}
}
}
```
And now the query via DSL:
```php
$regexpQuery = new RegexpQuery('name.first', 's.*y');
$search = new Search();
$search->addQuery($regexpQuery);
$queryArray = $search->toArray();
```
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-regexp-query.html
......@@ -49,6 +49,7 @@ For more information how to combine search queries take a look at [How to search
- [Prefix](Prefix.md)
- [Query string](QueryString.md)
- [Range](Range.md)
- [Regexp](Regexp.md)
- [Simple query string](SimpleQueryString.md)
- [Term](Term.md)
- [Terms](Terms.md)
......
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