$r->send();
}
- public function search($query, $page, $perPage)
+ public function search($query, $filters, $page, $perPage)
{
$r = new Elasticsearch_Request(
$this->baseUrl . 'document/_search',
'term' => array(
'status' => 'indexed'
)
- )
+ ),
)
)
),
//array('modate' => array('order' => 'desc'))
)
);
+ foreach ($filters as $type => $value) {
+ $doc['query']['bool']['must'][] = array(
+ 'term' => array(
+ $type => $value
+ )
+ );
+ }
+
//unset($doc['_source']);
//ini_set('xdebug.var_display_max_depth', 10);