v-technologies/simpl-es — pull request #8 by fbourigault (2014-07-28 15:03:35+00:00)
Title: Feature criteria match

This allows the usage of match queries in single or multiple fields.

The following query on multiple fields...
```php
$request->query()->options(array('type' => 'match'))->in(array('field1', 'field2'))->match('toto');
```
...will produce this request :
```json
{
"query": {
"bool": {
"should": [
{
"match": {
"field1": "toto"
}
},
{
"match": {
"field2": "toto"
}
}
]
}
}
}
```

And this one with a single field...
```php
$request->query()->options(array('type' => 'match'))->in('field1')->match('toto');
```

...will produce this request :
```json
{
"query": {
"match": {
"field1": "jim"
}
}
}
```