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

Fix : Erreur de reconstruction d'index en ligne de commande

parent b41086a4
Loading
Loading
Loading
Loading
+5 −0
Changes for module/Oscar/src/Oscar/Service/OrganizationService.php: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -232,6 +232,11 @@ class OrganizationService implements ServiceLocatorAwareInterface, EntityManager
        return $searchStrategy;
    }

    public function searchIndexRebuild()
    {
        return $this->getSearchEngineStrategy()->rebuildIndex($this->getOrganizations());
    }

    /**
     * Retourne le résultat de la recherche $search.
     *
+0 −50
Changes for module/Oscar/src/Oscar/Strategy/Search/OrganizationElasticSearch.php: 0 added lines, 50 removed lines.
Original line number Diff line number Diff line
@@ -130,56 +130,6 @@ class OrganizationElasticSearch implements OrganizationSearchStrategy
            $this->getClient()->bulk($params);
        }


//        'id' => $organization->getId(),
//        'code' => $organization->getCode(),
//        'shortname' => $organization->getShortName(),
//        'fullname' => $organization->getFullName(),
//        'email' => $organization->getEmail(),
//        'city' => $organization->getCity(),
//        'country' => $organization->getCountry(),
//        'zipcode' => $organization->getZipCode(),
//        //            'address1' => $organization->getStreet1(),
//        //            'address2' => $organization->getStreet2(),
//        //            'address3' => $organization->getStreet3(),
//        'siret' => $organization->getSiret(),
//        'country' => $organization->getCountry(),
//        'persons' => $persons,
//        'activities' => $activities,
//        'connectors' => $connectors

//        /******** CONFIGURATION DU MAPPING ***/
//        $params = [
//            'index' => $this->getIndex(),
//            'type' => $this->getType(),
//            'body' => [
//                $this->getType() => [
//                    '_source' => [
//                        'enabled' => true
//                    ],
//                    'properties' => [
//                        'code' => [
//                            'type' => 'text'
//                        ],
//                        'shortname' => [
//                            'type' => 'text',
//                            'boost' => 5
//                        ],
//                        'fullname' => [
//                            'type' => 'text',
//                            'boost' => 5
//                        ],
//                        'email' => [
//                            'type' => 'text'
//                        ],
//                    ]
//                ]
//            ]
//        ];
//
//        $response = $this->getClient()->indices()->putMapping($params);


        return $repport;
    }