Skip to content

Commit 2a7ea27

Browse files
author
Julien Colinet
committed
Compatibility remove index with Uuid / Ulid
This does not work correctly with a UUID or ULID object as the primary key. To index a document, no problem, Meilisearch does convert the ObjectId into a character string. On the other hand, to delete a resource from MeiliSearch, you must indicate the ObjectId in character string in the url of the DELETE request. While waiting for the refactoring on the objectID which will surely correct this bug (# 58). My fix while waiting for the refacto of the objectId is to indicate the ObjectID property of the normalized object instead of entity-> getID ().
1 parent 4657401 commit 2a7ea27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Engine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function remove($searchableEntities): array
8585
$data[$indexUid] = [];
8686
}
8787

88-
$data[$indexUid][] = $entity->getId();
88+
$data[$indexUid][] = $searchableArray['id'];
8989
}
9090

9191
$result = [];

0 commit comments

Comments
 (0)