Content/ArticleDataProvider.php
private function getBoolQuery($field, array $values, $operator)
    {
        $type = ('or' === strtolower($operator) ? BoolQuery::SHOULD : BoolQuery::MUST);

        $query = new BoolQuery();
        foreach ($values as $value) {
            $query->add(new TermQuery($field, $value), $type);
        }

        return $query;
    }
private function getBoolQuery($field, array $values, $operator)
    {
        $type = ('or' === strtolower($operator) ? BoolQuery::SHOULD : BoolQuery::MUST);

        $query = new BoolQuery();
        foreach ($values as $value) {
            $query->add(new TermQuery($field, $value), $type);
        }

        return $query;
    }
private function getBoolQuery ( $ field , array $ values , $ operator ) { $ type = ( 'or' === strtolower ( $ operator ) ? BoolQuery :: SHOULD : BoolQuery :: MUST ) ; $ query = new BoolQuery ( ) ; foreach ( $ values as $ value ) { $ query -> add ( new TermQuery ( $ field , $ value ) , $ type ) ; } return $ query ; }
Returns boolean query for given fields and values.

@param string $field
@param array $values
@param string $operator

@return BoolQuery
Returns boolean query for given fields and values .