Primary Key Inference #206
Replies: 6 comments 2 replies
-
As we haven't had any significant feedback on this call for feedback, I think we should keep the primary key inference but in a different way to better guide users to prevent unwanted consequences. Today the inference will be automatically triggered and choose the first field containing the In order to prevent this problem, the engine could search a field called The primaryKey can always be specified to override this behavior. From our analytics, we realize that the majority of users specify the primary key set We could also rename |
Beta Was this translation helpful? Give feedback.
-
Mentioned by @GregoryConrad here meilisearch/milli#695 (comment) I'm pasting the issue content.
|
Beta Was this translation helpful? Give feedback.
-
Hi! Thanks for tagging me here. I also thought of a 5th solution today, in addition to the above 4 that I gave. This is my preferred solution at the moment: RecasingThe idea is re-casing the given fields in a document to a specific type (say, Here are some examples:
Recasing can be done with Regex emulation of recasingWe can also emmulate the recasing above with something like the following regex: ((^|(.*[\d-_ ]))(id|ID)($|([\d-_ ].*)))|((^|(.*[\d-_ A-Za-z]))Id($|([\d-_ A-Z].*))) This looks like a mouthful, but here's a quick breakdown. We look for "id", "Id", or "ID".
If we see "id" or "ID", we use the following to match before and after the "id"/"ID":
If we see "Id", we use the following to match before and after:
This solution was included in case you do not want to add |
Beta Was this translation helpful? Give feedback.
-
Sorry to nag, but is there any update on this discussion internally? I'd be happy to submit a PR to milli for the simple case of checking for |
Beta Was this translation helpful? Give feedback.
-
Hello @GregoryConrad 👋 We have decided to work on it for v1.0, and we will start next week! I will keep you updated as soon as possible. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone 👋 I'm locking that discussion since it will be released with Feel free to open a new discussion to share feedback or a feature request. Thank you 🙇♂️ |
Beta Was this translation helpful? Give feedback.
-
Hi everyone 👋
We'd love to hear your opinion about our mechanism for inferring the primary key of documents during the first indexing process. We have thoughts about it, but we would love to verify them from your impressions and feedback.
We have prepared a small survey so that you can help us to see more clearly on that particular subject. 🔮
Survey link
Thank you very much!
Beta Was this translation helpful? Give feedback.
All reactions