Skip to content

Commit 79f45f8

Browse files
authored
Merge PR #391 and fix exception swallowing in getAllManagedIndices()
1 parent 90a2608 commit 79f45f8

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

doc/02_Configuration/03_Index_Management.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,8 @@ After updating class definitions during deployment, run:
188188
bin/console generic-data-index:deployment:reindex
189189
```
190190

191-
<<<<<<< HEAD
192191
This updates the index structure for all class definitions modified since the last
193192
deployment and reindexes data objects for affected classes.
194-
=======
195-
This command will update the index structure for all data object classes which were created/updated since the last deployment and reindex all data objects for relevant classes.
196193

197194
### Cleaning Up Unused Indices
198195

@@ -207,4 +204,3 @@ To preview what would be deleted without performing any changes, run:
207204
```
208205
php bin/console generic-data-index:cleanup:unused-indices --dry-run
209206
```
210-
>>>>>>> pr/391

src/Service/SearchIndex/UnusedIndexCleanupService.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
namespace Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex;
1515

16-
use Exception;
1716
use Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\IndexAliasServiceInterface;
1817
use Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\SearchIndexServiceInterface;
1918

@@ -76,11 +75,7 @@ private function getAllManagedIndices(): array
7675
return [];
7776
}
7877

79-
try {
80-
$stats = $this->searchIndexService->getStats($indexPrefix . '*');
81-
} catch (Exception) {
82-
return [];
83-
}
78+
$stats = $this->searchIndexService->getStats($indexPrefix . '*');
8479

8580
$indices = $stats['indices'] ?? null;
8681
if (!is_array($indices)) {

0 commit comments

Comments
 (0)