code: private function configureSearchServices(ContainerBuilder $container, $connectionName, $connectionParams)
      {
          $alias = $this->getAlias();
  
          // Endpoint resolver
          $endpointResolverDefinition = new DefinitionDecorator(self::ENDPOINT_RESOLVER_ID);
          $endpointResolverDefinition->replaceArgument(0, $connectionParams['entry_endpoints']);
          $endpointResolverDefinition->replaceArgument(1, $connectionParams['mapping']['translations']);
          $endpointResolverDefinition->replaceArgument(2, $connectionParams['mapping']['default']);
          $endpointResolverDefinition->replaceArgument(3, $connectionParams['mapping']['main_translations']);
          $endpointResolverId = "$alias.connection.$connectionName.endpoint_resolver_id";
          $container->setDefinition($endpointResolverId, $endpointResolverDefinition);
  
          // Core filter
          $coreFilterDefinition = new DefinitionDecorator(self::CORE_FILTER_ID);
          $coreFilterDefinition->replaceArgument(0, new Reference($endpointResolverId));
          $coreFilterId = "$alias.connection.$connectionName.core_filter_id";
          $container->setDefinition($coreFilterId, $coreFilterDefinition);
  
          // Gateway
          $gatewayDefinition = new DefinitionDecorator(self::GATEWAY_ID);
          $gatewayDefinition->replaceArgument(1, new Reference($endpointResolverId));
          $gatewayId = "$alias.connection.$connectionName.gateway_id";
          $container->setDefinition($gatewayId, $gatewayDefinition);
      }
docs: Creates needed search services for given connection name and parameters.
  
  @param ContainerBuilder $container
  @param string $connectionName
  @param array $connectionParams