Skip to content

Remove "objectID" usage of this repository #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
curquiza opened this issue Mar 20, 2021 · 2 comments
Open

Remove "objectID" usage of this repository #66

curquiza opened this issue Mar 20, 2021 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@curquiza
Copy link
Member

curquiza commented Mar 20, 2021

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:

⚠️ 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

@curquiza curquiza changed the title Remove "objectID Remove "objectID" usage of this repository Mar 20, 2021
@codedge codedge mentioned this issue Apr 30, 2021
3 tasks
@brunoocasali brunoocasali added enhancement New feature or request good first issue Good for newcomers labels Dec 20, 2022
@conradfr
Copy link

conradfr commented Apr 18, 2025

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.

@norkunas
Copy link
Collaborator

Sorry for the bad experience, I also had some problems with this. It's on my todo list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants