Span Multi Term Query

More info about span multi term query is in the official elasticsearch docs

The span_multi query allows you to wrap a multi term query (one of wildcard, fuzzy, prefix, range or regexp query) as a span query, so it can be nested. Example:

Simple example

    "query": {
                "prefix" : { "user" :  { "value" : "ki" } }


$search = new Search();
$query = new PrefixQuery('user', 'ki');
$spanMultiTermQuery = new SpanMultiTermQuery($query);

$queryArray = $search->toArray();