Regexp Query
More info about regexp query is in the official elasticsearch docs
The regexp query allows you to use regular expression term queries.
Simple example
{
"query": {
"regexp":{
"name.first" : "s.*y"
}
}
}
And now the query via DSL:
$regexpQuery = new RegexpQuery('name.first', 's.*y');
$search = new Search();
$search->addQuery($regexpQuery);
$queryArray = $search->toArray();