mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
Merge pull request #1395 from jygaulier/PHRAS-442_FACETS-IN-API
PHRAS-442
This commit is contained in:
@@ -1099,18 +1099,19 @@ class V1Controller extends Controller
|
||||
$this->getSearchEngine()->clearCache();
|
||||
|
||||
$ret = [
|
||||
'offset_start' => $offsetStart,
|
||||
'per_page' => $perPage,
|
||||
'offset_start' => $offsetStart,
|
||||
'per_page' => $perPage,
|
||||
'available_results' => $search_result->getAvailable(),
|
||||
'total_results' => $search_result->getTotal(),
|
||||
'error' => (string)$search_result->getError(),
|
||||
'warning' => (string)$search_result->getWarning(),
|
||||
'query_time' => $search_result->getDuration(),
|
||||
'search_indexes' => $search_result->getIndexes(),
|
||||
'suggestions' => array_map(
|
||||
'total_results' => $search_result->getTotal(),
|
||||
'error' => (string)$search_result->getError(),
|
||||
'warning' => (string)$search_result->getWarning(),
|
||||
'query_time' => $search_result->getDuration(),
|
||||
'search_indexes' => $search_result->getIndexes(),
|
||||
'suggestions' => array_map(
|
||||
function (SearchEngineSuggestion $suggestion) {
|
||||
return $suggestion->toArray();
|
||||
}, $search_result->getSuggestions()->toArray()),
|
||||
'facets' => $search_result->getFacets(),
|
||||
'results' => [],
|
||||
'query' => $search_result->getQuery(),
|
||||
];
|
||||
|
Reference in New Issue
Block a user