From 05f3fa0aaaa54ad27b1c066bcb74a0b8b07e0c42 Mon Sep 17 00:00:00 2001 From: Evan Owens Date: Wed, 5 Jun 2024 22:44:21 -0400 Subject: [PATCH] optimize() deprecated and replaced with forcemerge() `optimze()` deprecated in favor of `forcemerge()` in Elastica v5.x and removed in v6.x. --- doc/cookbook/populate-events.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/cookbook/populate-events.md b/doc/cookbook/populate-events.md index f8ed7b80f..185670c0c 100644 --- a/doc/cookbook/populate-events.md +++ b/doc/cookbook/populate-events.md @@ -70,7 +70,7 @@ class PopulateListener { $index = $this->indexManager->getIndex($event->getIndex()); $settings = $index->getSettings(); - $index->optimize(['max_num_segments' => 5]); + $index->forcemerge(['max_num_segments' => 5]); $settings->setRefreshInterval('1s'); } }