code: protected function getSearchTargets($languageSettings)
      {
          if ($this->endpointResolver instanceof SingleEndpointResolver && !$this->endpointResolver->hasMultipleEndpoints()) {
              return '';
          }
  
          $shards = array();
          $endpoints = $this->endpointResolver->getSearchTargets($languageSettings);
  
          if (!empty($endpoints)) {
              foreach ($endpoints as $endpoint) {
                  $shards[] = $this->endpointRegistry->getEndpoint($endpoint)->getIdentifier();
              }
          }
  
          return implode(',', $shards);
      }
docs: Returns search targets for given language settings.
  
  Only return endpoints if there are more then one configured, as this is meant for use on shard parameter.
  
  @param array $languageSettings
  
  @return string