protected function getAllSearchTargets()
    {
        if ($this->endpointResolver instanceof SingleEndpointResolver && !$this->endpointResolver->hasMultipleEndpoints()) {
            return '';
        }

        $shards = [];
        $searchTargets = $this->endpointResolver->getEndpoints();
        if (!empty($searchTargets)) {
            foreach ($searchTargets as $endpointName) {
                $shards[] = $this->endpointRegistry->getEndpoint($endpointName)->getIdentifier();
            }
        }

        return  implode(',', $shards);
    }