/** * @param string $dataset * @param string $query * @param string $sort * @param int $rows * @param int $start * * @return Response */ public function searchAction($dataset, $query, $sort, $rows, $start) { $search = new Search($dataset); $search->setFilter($query)->setStart($start)->setSort($sort)->setRows($rows); $results = $this->search($search); return new Response(json_encode($results)); }
private function createQueryColumnFilterSearch($column, $value, $delimiter = ':') { $filter = sprintf('%s%s%s', $column, $delimiter, $value); $dataset = uniqid(); $search = new Search($dataset); $search->setFilter($filter); $this->assertEquals($filter, $search->getFilter()); $this->assertEquals($column, $search->getFilterColumn()); $this->assertEquals($value, $search->getFilterValue()); }