-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Autosuggest works erratically if the responses are not received in the right order #719
Autosuggest works erratically if the responses are not received in the right order #719
Comments
Technically it has not that much to do with OFF typical added value. Theoretically it's quite interesting though. It would be like the combination of a cache of results and the latest typed string. Currently the suggestions are called each time the user types a new character (or something like that): return OpenFoodAPIClient.getSuggestions(
tagType!,
language: ProductQuery.getLanguage()!,
country: ProductQuery.getCountry(),
limit: 15,
input: input,
); The displayed suggestions are refreshed by the I can code a |
@stephanegigandet Just curious: have suggestions evolved recently? |
@monsieurtanuki We now also return taxonomy entries that have one of their synonyms match the input string, even if it doesn't match the main name of the entry. e.g. for countries, we will also match country codes, so looking for "fr" also returns the Faroese Islands because they have the country code FRO. https://world.openfoodfacts.org/api/v3/taxonomy_suggestions?tagtype=countries&string=fr Same for "us", we return "United States" and "Soviet Union" (which matches "USSR"): https://world.openfoodfacts.org/api/v3/taxonomy_suggestions?tagtype=countries&string=us In the future, we might adjust the filtering and ranking of some taxonomies, based on context, popularity etc. like we do for packaging shapes and materials. |
@stephanegigandet I understand the concept and I agree with it. In some cases you guys go too far, to a point where one can suspect something is wrong, for instance looking for "F" countries (https://world.openfoodfacts.org/api/v3/taxonomy_suggestions?tagtype=countries&string=f):
Probably an issue with "of". |
@monsieurtanuki Right, that's because we have the full official names of countries in the taxonomy as synonyms... We may want to remove those. en:Algeria, People’s Democratic Republic of Algeria, DZ, DZA |
Description
Part of
The text was updated successfully, but these errors were encountered: