-
Notifications
You must be signed in to change notification settings - Fork 269
Description
I've just realized that we are not really accurate in the documentation (and in the FAQ) about the primary key error.
We talk about the document id is missing or Missing primary key error.
All of these to mean vaguely "MeiliSearch is not able to infer the infer the primary key" or "your primary key is not well-formatted".
I have no idea to make it clearer right now, but here are the different error states of MeilISearch about the primary key (don't hesitate to complete if I forgot something):
Could not infer a primary keyappears when you try to push your documents for the first time and MeiliSearch is not able to infer one = noidvisible in one of the attributes. This error appears synchronously, I mean, there is noupdateIdreturned during the addition of document because of this error.document id is missingappears asynchronously (you can check it in the update status). It means that a primary key has previously been defined (or well inferred) but you forgot to put this attribute in one of your documents.serializer error; a document primary key can be of type integer or string only composed of alphanumeric characters, hyphens (-) and underscores (_)appears asynchronously (you can check it in the update status). It means that a primary key has previously been defined (or well inferred) but not well-formatted.
=> so there is no "Missing primary key error". And "document id is missing" does not mean a bad inference or a not well-formatting.
I don't say we have to explain all of this in the documentation, but maybe, we can try to make it clearer. At least when we mention error messages.
But as I said, I don't know how to make it better for the moment. I wanted to give all the clues to everyone to think about 🙂
Steps
- Clearer in the primary key part
- Clearer in the FAQ (why not decompose in 2 questions?)