-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
Add autocomplete to the search text field #147
Comments
I can recommend this package for suggestions |
This package goes even further than what I imagined. What I imagined: when the end-user types in their text, the suggestions come from their search history, predetermined words or words we collect from the products already downloaded. What this package may enable: a server database lookup - if I type in "wasa" the collection of "wasa" breads will be displayed even before I click on the "search" button. Now that I'm thinking most suggestion packages are probably able to do that - something like an That also means that on the server side they should be able to tell us "cookies? more than 500 results", "cookies chocolate? 152 results", "cookies chocolate walnut? only 12 results, here they are". |
Related to that, we do have an API to get suggestions for categories names, but not for product names / brands. (at least not yet) https://world.openfoodfacts.org/cgi/suggest.pl?tagtype=categories&term=sou |
@stephanegigandet Something like that could be interesting, but it's much too verbose as is. Assuming that I speak French and that I type in only |
I guess we could try to weight the suggestions by frequency, or number of products or something. |
@stephanegigandet I've just noticed that the autocomplete feature is not implemented on the server side either. For instance I've just searched " |
…ield Implemented a look-up on the local database, and linked it to the text field. For the moment, the matching products are only printed in the console. The next step would be to display the results with an autocomplete text field. Impacted files: * `dao_product.dart`: new method `List<Product> getSuggestions(String)` * `home_page.dart`: added an `onUpdate` method on the text field to print the products that match locally
feature/#147 - local look-up - first step towards autocomplete text field
Tracking bug for server side support of autocomplete suggestions: openfoodfacts/openfoodfacts-server#5006 |
Some server side work is going on at https://github.com/openfoodfacts/openfoodfacts-search |
Server side autocomplete is about to be deployed to staging, perfect opportunity to test it in the dev mode, openfoodfacts/openfoodfacts-server#5006 What P does this have @teolemon |
|
What
Part of
The text was updated successfully, but these errors were encountered: