Commit 12251645 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Merge branch 'master' of git.unicaen.fr:open-source/oscar into starling

parents f81b0cd0 6ab2439d
Loading
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -822,7 +822,7 @@ class OrganizationService implements UseOscarConfigurationService, UseEntityMana

            // ORDER BY de LREM
            // Permet de forcer le trie dans l'ordre des IDs fournit par Elastic Search
            if (count($ids) > 1) {
            if (count($ids) > 0 ) {
                if( $filter['sort'] == 'hit' ){
                    $sortSize = 25; // On ne trie que les 25 premiers
                    $this->getLoggerService()->debug("SORT BY HIT (elastic IDS)");
@@ -841,6 +841,9 @@ class OrganizationService implements UseOscarConfigurationService, UseEntityMana
                    $qb->orderBy('ORD', 'ASC');
                }
                $qb->where('o.id IN(:ids)')->setParameter('ids', $ids);
            } else {
                // Pas de résultat
                $qb->where('o.id < 0');
            }
        }

+1 −1
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ abstract class ElasticSearchEngine

        $ids = [];
        $idsProjects = [];
        if ($response && $response['hits'] && $response['hits']['total'] > 0) {
        if ($response && $response['hits']) {
            foreach ($response['hits']['hits'] as $hit) {
                $ids[] = intval($hit["_id"]);
                if( array_key_exists('project_ids', $hit['_source']) ) {
+1 −1
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ class OrganizationElasticSearch extends ElasticSearchEngine implements IOrganiza
                    ],
                    [
                        "match" => [
                            "connector" => [
                            "connectors" => [
                                "query" => $search,
                                'fuzziness' => "AUTO", // "Tolérance" aux fautes,
                            ]