Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text search considering 'custom completeness' #2762

Open
Tracked by #5492
maks-io opened this issue Dec 10, 2019 · 1 comment
Open
Tracked by #5492

Text search considering 'custom completeness' #2762

maks-io opened this issue Dec 10, 2019 · 1 comment
Labels
🔎 Search status system Products have a number of completion states, eg: https://world.openfoodfacts.org/states

Comments

@maks-io
Copy link

maks-io commented Dec 10, 2019

The title for this feature request maybe isn't the best one, but i will try to describe it by answering the following questions:

What

  • Users of my app are allowed to search the OOF database via text search (as described here: https://en.wiki.openfoodfacts.org/API/Read/Search ). However, a food is only 'valid' within my app, if it at least has information on the 3 macro nutrients (protein, carbs and fat). I currently didn't find any way to limit the search result to being complete regarding those 3 macro nutrients.
  • I currently do it the following way: users do the text search first, they get listed as possible options in my select field, and only after the user selects one of the entries, then i will do a second API call to OOF, looking for the detailed information (including its nutrients). In those cases it often happens, that users select foods with incomplete macro nutrient data of course, because they won't know if a food is complete unless selecting it in the drop-down.

Proposed solution

  • I guess it could be nice to filter out certain foods that don't fulfil certain (custom) completeness, when doing the API call. In my case I would label a food as 'complete' if it has data about the 3 macro nutrients. Also, in some more rare use cases within my app it is necessary for a food to also have data about its sugar and saturated fat. It would be nice to only fetch those foods from OOF too.

Considered alternatives

  • My current workaround is described above.
  • In case there is already away to achieve what i would like to achieve, I am sorry, and simultaneously happy... please let me know then :)

Part of

@maks-io maks-io added the ✨ Feature Features or enhancements to Open Food Facts server label Dec 10, 2019
@teolemon teolemon added 🔎 Search status system Products have a number of completion states, eg: https://world.openfoodfacts.org/states labels Jan 10, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2020

Stale issue message

@teolemon teolemon removed the ✨ Feature Features or enhancements to Open Food Facts server label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔎 Search status system Products have a number of completion states, eg: https://world.openfoodfacts.org/states
Projects
Status: To discuss and validate
Development

No branches or pull requests

2 participants