Loading module/Oscar/src/Oscar/Strategy/Search/OrganizationElasticSearch.php +15 −59 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ class OrganizationElasticSearch extends ElasticSearchEngine implements IOrganiza public function add(Organization $organization): callable|array { $this->addItem($organization); return $this->addItem($organization); } public function getIndexableDatas(mixed $organization): array Loading Loading @@ -84,50 +84,6 @@ class OrganizationElasticSearch extends ElasticSearchEngine implements IOrganiza ]; } // public function search($search) // { // $params = [ // 'index' => $this->getIndex(), // 'type' => $this->getType(), // 'body' => [ // 'size' => 10000, // "query" => [ // 'multi_match' => [ // 'fields' => [ // 'code^7', // 'shortname^9', // 'fullname^5', // 'description', // 'email', // 'city', // 'siret', // 'country', // 'connectors', // 'zipcode', // 'persons', // 'activities' // ], // "fuzziness"=> "auto", // 'query' => $search, // // ] // ] // ] // ]; // // $response = $this->getClient()->search($params); // $ids = []; // // if ($response && $response['hits'] && $response['hits']['total'] > 0) { // foreach ($response['hits']['hits'] as $hit) { // $ids[] = $hit["_id"]; // } // } // // return $ids; // } public function getFieldsSearchedWeighted(): array { return [ Loading Loading
module/Oscar/src/Oscar/Strategy/Search/OrganizationElasticSearch.php +15 −59 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ class OrganizationElasticSearch extends ElasticSearchEngine implements IOrganiza public function add(Organization $organization): callable|array { $this->addItem($organization); return $this->addItem($organization); } public function getIndexableDatas(mixed $organization): array Loading Loading @@ -84,50 +84,6 @@ class OrganizationElasticSearch extends ElasticSearchEngine implements IOrganiza ]; } // public function search($search) // { // $params = [ // 'index' => $this->getIndex(), // 'type' => $this->getType(), // 'body' => [ // 'size' => 10000, // "query" => [ // 'multi_match' => [ // 'fields' => [ // 'code^7', // 'shortname^9', // 'fullname^5', // 'description', // 'email', // 'city', // 'siret', // 'country', // 'connectors', // 'zipcode', // 'persons', // 'activities' // ], // "fuzziness"=> "auto", // 'query' => $search, // // ] // ] // ] // ]; // // $response = $this->getClient()->search($params); // $ids = []; // // if ($response && $response['hits'] && $response['hits']['total'] > 0) { // foreach ($response['hits']['hits'] as $hit) { // $ids[] = $hit["_id"]; // } // } // // return $ids; // } public function getFieldsSearchedWeighted(): array { return [ Loading