File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -413,7 +413,7 @@ public function updateDocumentSearchIndexes(string $documentName): void
413
413
414
414
$ definedNames = array_column ($ searchIndexes , 'name ' );
415
415
try {
416
- $ existingNames = array_column (iterator_to_array ($ collection ->listSearchIndexes ()), 'name ' );
416
+ $ existingNames = array_column (iterator_to_array ($ collection ->listSearchIndexes ([ ' typeMap ' => [ ' root ' => ' array ' ]] )), 'name ' );
417
417
} catch (CommandException $ e ) {
418
418
/* If $listSearchIndexes doesn't exist, only throw if search indexes have been defined.
419
419
* If no search indexes are defined and the server doesn't support search indexes, there's
@@ -465,7 +465,7 @@ public function deleteDocumentSearchIndexes(string $documentName): void
465
465
$ collection = $ this ->dm ->getDocumentCollection ($ class ->name );
466
466
467
467
try {
468
- $ searchIndexes = $ collection ->listSearchIndexes ();
468
+ $ searchIndexes = $ collection ->listSearchIndexes ([ ' typeMap ' => [ ' root ' => ' array ' ]] );
469
469
} catch (CommandException $ e ) {
470
470
// If the server does not support search indexes, there are no indexes to remove in any case
471
471
if ($ this ->isSearchIndexCommandException ($ e )) {
You can’t perform that action at this time.
0 commit comments