Should we use uid
in task body ?
#353
Replies: 3 comments
-
I agree with @bidoubiwa. I think that if we keep the same identifier |
Beta Was this translation helpful? Give feedback.
-
Hi @bidoubiwa and @alallema! Thanks for the feedback! 😇 To explain the logic from a pure format and data organization point of view when designing an API, here is what I think. On this route, the API handle the It brings some advantages:
However, something we could do is to use a nested object representation and transform {
"uid": 1,
"index": {
"uid": "movies"
},
...
} There is no real immediate interest in returning more information about the index related to the task other than its |
Beta Was this translation helpful? Give feedback.
-
The Specified in meilisearch/specifications#144. Locking the discussion. |
Beta Was this translation helpful? Give feedback.
-
updateId
in the past. Because I cannot delete this discussion I leave it open :)archive
I have a hard time when coding to see the difference betweenuid
of an index anduid
of a task. Inside the task theuid
of an index is calledindexUid
but when creating an index it is calleduid
.Maybe we can consider to avoid any confusion on what theuid
represents to name them the same everywhere?indexUid
in all contexts andtaskUid
in the tasks body.Task body:
Index body:
This is why I originally brought up the discussion:
or
If someone enter a source code and see a
uid
variable running in the wild, they wont be able to know for sure which one of the index or task uid it is.BUT! it does create consistency and can be more intuitive for the user. I may be completely biased because of my previous usage of meilisearch !!
Beta Was this translation helpful? Give feedback.
All reactions