getIndices example

static::assertSame('elasticsearch', $collector->getName());

        $collector->collect(
            new Request(),
            new Response()
        );

        static::assertEquals(600, $collector->getTime());
        static::assertEquals(3, $collector->getRequestAmount());
        static::assertCount(3, $collector->getRequests());
        static::assertEquals(['status' => 'green']$collector->getClusterInfo());
        static::assertEquals(['indices' => ['index1' => ['status' => 'green'], 'index2' => ['status' => 'green']]]$collector->getIndices());
    }

    public function testReset(): void
    {
        $client = $this->createMock(ClientProfiler::class);
        $client
            ->method('getCalledRequests')
            ->willReturn([
                ['time' => 0.1],
                ['time' => 0.2],
                ['time' => 0.3],
            ]);


        $this->config = $config;
    }

    public function __invoke(AdminSearchIndexingMessage $message): void
    {
        $indexer = $this->getIndexer($message->getEntity());

        $documents = $indexer->fetch($message->getIds());

        $this->push($indexer$message->getIndices()$documents$message->getIds());
    }

    public static function getSubscribedEvents(): array
    {
        return [
            EntityWrittenContainerEvent::class => [
                ['refresh', -1000],
            ],
        ];
    }

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