handleIndexingMessage example

private readonly LoggerInterface $logger,
        private readonly int $indexingBatchSize
    ) {
    }

    public function __invoke(ElasticsearchIndexingMessage $message): void
    {
        if (!$this->helper->allowIndexing()) {
            return;
        }

        $this->handleIndexingMessage($message);
    }

    public function iterate(?IndexerOffset $offset = null): ?ElasticsearchIndexingMessage
    {
        if (!$this->helper->allowIndexing()) {
            return null;
        }

        if ($offset === null) {
            $offset = $this->init();
        }

        
if (!$this->helper->allowIndexing()) {
            return;
        }

        if ($message instanceof ElasticsearchLanguageIndexIteratorMessage) {
            $this->handleLanguageIndexIteratorMessage($message);

            return;
        }

        $this->handleIndexingMessage($message);
    }

    /** * @param IndexerOffset|null $offset */
    public function iterate($offset): ?ElasticsearchIndexingMessage
    {
        if (Feature::isActive('ES_MULTILINGUAL_INDEX')) {
            return $this->newImplementation->iterate($offset);
        }

        
Home | Imprint | This part of the site doesn't use cookies.