-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: enhanced completion #259
Conversation
* add the option of a preprocessor for taxonomies * add a preprocessor for Open Food Facts to handle: * brands taxonomy * add main language * add xx entries to all languages * fix to have names in synonyms * add a score to completion to first match shortest entries * enable querying multiple languages at once * added tests
This reverts commit 9d47ab6.
Co-authored-by: Stéphane Gigandet <stephane@openfoodfacts.org>
In the search bar, when typing a single letter and deleting it, an autocomplete query with an empty http://search.localhost:8000/autocomplete?q=&langs=en&taxonomy_names=brands,categories&size=5 |
Clicking on a brand suggested by auto-completion does not seem to work. For example, with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me, I added a few remarks about possible bugs above!
and fix a small bug on completion text that was not removed from suggestion input
The prefix is not wrong in regard to the taxonomy… but the brands_tags field is different from the rest of the _tags field because it has no language prefix… I will remove the language prefix for now. |
because it might not work from some pseudo taxonomized fields
I tried to change entries order in the array, but it does not change… and don't know how to change that in Elasticsearch… So I added the entry name in the label, this way it's more easy to understand. |
We could get a category image using wikidata: https://wikidata.org/w/rest.php/wikibase/v1/entities/items/Q20034?_fields=type,labels,descriptions,aliases,statements,sitelinks (image is P18) |
That's fine, it's a very minor issue :) |
Improvements on taxonomies completion API:
TODO: