protected function getCondition(Criterion $criterion) { $terms = array(); $values = (array) $criterion->value; foreach ($values as $value) { $terms[] = array('match' => array('fields_doc.' . $criterion->target => array('query' => $value))); } return $terms; }