PHRAS-1895_PORT_PHRAS-1401_include_json_format_return_record (#2494)

* PHRAS-1895_PORT_PHRAS-1401 include json format return record

* PHRAS-1895_rollback deleted action ref PHRAS-1688
This commit is contained in:
KallooaSan
2018-02-28 20:31:45 +04:00
committed by jygaulier
parent 71f6e5d964
commit 00be9e51b0
11 changed files with 225 additions and 95 deletions

View File

@@ -59,14 +59,14 @@ class SearchController extends Controller
$result = $this->getSearchEngine()->query($query, $options);
$this->getUserManipulator()->logQuery($this->getAuthenticatedUser(), $result->getUserQuery());
$this->getUserManipulator()->logQuery($this->getAuthenticatedUser(), $result->getQueryText());
// log array of collectionIds (from $options) for each databox
$collectionsReferencesByDatabox = $options->getCollectionsReferencesByDatabox();
foreach ($collectionsReferencesByDatabox as $sbid => $references) {
$databox = $this->findDataboxById($sbid);
$collectionsIds = array_map(function(CollectionReference $ref){return $ref->getCollectionId();}, $references);
$this->getSearchEngineLogger()->log($databox, $result->getUserQuery(), $result->getTotal(), $collectionsIds);
$this->getSearchEngineLogger()->log($databox, $result->getQueryText(), $result->getTotal(), $collectionsIds);
}
$this->getSearchEngine()->clearCache();