-
-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Labels
Description
We will probably have thousands of properties and we need to make them easy to find.
For the end-user, the best option would be to enter a keyword related to the property he wants to add.
Example: searching how to enter the color of the cap:
- the user enter "c", then "o", then "l"
- the UI should provide a list containing properties (or descriptions) containing "co" then "col"
The GET /keys is currently returning all the keys with stats:
- the stats are not useful for our current concern
- returning ALL the keys might be costly when there are thousands of properties
Currently, Open Food Facts website is already using tags autocompletion with a library (tagify) that takes simple JSON arrays in input ["tag1","tag2","free_tag"] (see the explanation here).
Suggestion 1
Create a GET /keys&term=col which returns a simple JSON array: ["color","color_of_the_cap","multicolor"].
Suggestion 2
Create another API route to return only the useful data:
- rename GET /keys into /key_stats
- create GET /keys&term=col which returns a simple JSON array:
["color","color_of_the_cap","multicolor"].
Part of
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done