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

Add regexp filter doc.

parent c3bab416
No related branches found
No related tags found
Loading
# Regexp Filter
> More info about regexp filter is in the [official elasticsearch docs][1]
The regexp filter allows you to use regular expression term queries.
The regexp filter is similar to the [regexp query][2],
except that it is cacheable and can speedup performance in case you are
reusing this filter in your queries.
## Simple example
```JSON
{
"regexp":{
"name.first": "s.*y"
}
}
```
And now the query via DSL:
```php
$regexpFilter = new RegexpFilter('name.first', 's.*y');
$search = new Search();
$search->addFilter($regexpFilter);
$queryArray = $search->toArray();
```
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-indices-filter.html
[2]: ../Query/Regexp.md
\ No newline at end of file
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