public function indexer($index = null)
    {
        if (empty($this->nodeIndexerChain)) {
            $list = [];
            foreach ($this->keys() as $existing) {
                $list[$existing] = new NodeIndexer(
                    $existing,
                    $this->client,
                    $this->db,
                    $this->entityManager,
                    $this->moduleHandler,
                    $this->eventDispatcher,
                    $this->getIndexRealname($existing),
                    $this->preventBulkUsage
                );
            }
            $this->nodeIndexerChain = new NodeIndexerChain($list);
        }

        if ($index) {
            return $this->nodeIndexerChain->getIndexer($index);
        }

        return $this->nodeIndexerChain;
    }