public function handle(Client $client, $index, $type, $alias = null)
    {
        $alias = $alias ?: $index;

        $entries = $this->registry->get($alias, $type);

        $this->dispatchHandlingStartedEvent($entries);

        foreach ($entries as $entry) {
            $this->dispatchProvidingStartedEvent($entry);

            $entry->getProvider()->run(
                $client,
                $index,
                $entry->getType(),
                $this->dispatcher
            );

            $this->dispatchProvidingFinishedEvent($entry);
        }
    }