You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Algolia, to define the unique field of the documents uses the objectID field. Which is not the case of MeiliSearch. MeiliSearch uses the primary key: it infers it, or the user can define it.
More about the primary key of MeiliSerach: https://docs.meilisearch.com/learn/core_concepts/documents.html#primary-field
It means having a code base with objectID does not make sense for a MeiliSearch repository in terms of naming (related to #58) but also in terms of usage!
Indeed it leads us to some issues in the past, especially because the search() method is badly designed for MeiliSearch. See:
⚠️ Because you cannot know the primary key (so the unique field) when getting the search response by MeiliSearch we might think about a way to avoid using this information
The text was updated successfully, but these errors were encountered:
curquiza
changed the title
Remove "objectID
Remove "objectID" usage of this repository
Mar 20, 2021
I've been burned by the hardcoded 'objectID' in this bundle which was making the indexing task fail in meilisearch (which is done async so the error was not easily apparent) because the primary key had been set as 'id' during the index creation (on another language / lib).
if would be great to remove the hardcoded value (look up the index function in engine.php) and allow the primary key to be set in the config file indices.
This repository was highly built based on the Algolia's search bundle.
Algolia, to define the unique field of the documents uses the
objectID
field. Which is not the case of MeiliSearch. MeiliSearch uses the primary key: it infers it, or the user can define it.More about the primary key of MeiliSerach: https://docs.meilisearch.com/learn/core_concepts/documents.html#primary-field
It means having a code base with
objectID
does not make sense for a MeiliSearch repository in terms of naming (related to #58) but also in terms of usage!Indeed it leads us to some issues in the past, especially because the
search()
method is badly designed for MeiliSearch. See:The text was updated successfully, but these errors were encountered: