-
Notifications
You must be signed in to change notification settings - Fork 11
Reset Stop-Words and Synonyms Settings With A Null Value #47
Conversation
Co-authored-by: Quentin de Quelen <quentin@meilisearch.com>
I don't like the idea, I don't think that I would prefer that the user explicitly set the field to |
The other settings (for example
|
Sorry @ManyTheFish, I forgot to answer you I got caught elsewhere. Your proposal goes in the direction of an API that can be fully documented. Personally, I'm not a fan of having a hidden workaround that is not documented. The API format specification will solve this kind of case. However, it is important to keep in mind that sometimes we have to make deviations to keep a good DX. @curquiza, it's true for the 0.21 release, we cut in the fat to advance towards the release. However, your answer makes me wonder about two questions that we can deal with in future releases.
|
However I would add I've never seen someone reporting they have been confused about accepting the null value at the moment. So re-doing all this settings behavior instead of just making it consistent might be a lot of work in the transplant size for nothing (again, regarding the absence of current complaint). |
Agreed on the fact that the first proposal will shift the effort to the X integration libs. Probably not a good idea, as you pointed out this is something that is important to keep in mind. I don't really see a problem with having this null value in the POST even though it's something that seems unusual and might surprise some developers as well. As I said earlier, making some deviations to keep a good DX is sometimes necessary. We need factual stats on the use of these routes to talk about this again. The fact is that we have two routes that accomplish the same thing. Is this a problem at the moment? You tell me no from the user feedback you get! The advantage is that we will have a consistent behavior on the whole scope of the sub-settings routes with this specification. It's not an immediate priority anyway if we have no complaint about it and no quantitative statistics. Let's move forward on this specification as such 😉 |
Even if your decision is made, I want to share this smart way of usage 😊 It might be intersting. Example: {
"searchableAttributes": null,
"displayedAttributes": [
"title"
]
} will reset the searchable attributes and will update the displayed attributes at the same HTTP call. If we remove the possibility to use the |
What about: Calling POST /indexes/:uid/settings with
This would be similar to your example. |
From my POV, this means "I don't want any searchable attributes, and only |
My bad @curquiza, I miss understood the meaning of reset. 😅 |
Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
* Initialize specification * Apply suggestions from code review Co-authored-by: Quentin de Quelen <quentin@meilisearch.com> * add an example to reset with a null value * change subtitle * Update text/0047-reset-stop-words-synonyms-settings-with-null.md Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com> * add part for SDKS Co-authored-by: Quentin de Quelen <quentin@meilisearch.com> Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
Summary
All Sub Settings
POST
endpoint accepts a null value in the http request body to reset the engine configuration to the default values. This is not the case for Stop-words and Synonyms settings endpoints.Motivation
This specification is written to make the above mentioned routes consistent with the others.