openfoodfacts-server icon indicating copy to clipboard operation
openfoodfacts-server copied to clipboard

Autocomplete / suggest as you type backend for search queries on product name, brands and categories

Open stephanegigandet opened this issue 3 years ago • 8 comments

We currently do not have an autocomplete feature for text search queries from the search box, where people can type product names, brands, categories. It would be great to provide one.

We could try to make one from scratch (e.g. just using leading ngrams of product names / brands / categories), or we could try to use autocomplete features from other databases. e.g. ElasticSearch. MongoDB has autocomplete support only in the paid version (Atlas).

e.g. https://medium.com/@mourjo_sen/a-detailed-comparison-between-autocompletion-strategies-in-elasticsearch-66cb9e9c62c4

stephanegigandet avatar Mar 17 '21 15:03 stephanegigandet

One option would be using postgres text indexes. e.g. https://github.com/Grinnz/cpan-meta-browser/blob/master/lib/CPANMetaBrowser/Plugin/Backend/Pg.pm#L163

stephanegigandet avatar Mar 19 '21 09:03 stephanegigandet

Another option: https://www.meilisearch.com/

stephanegigandet avatar Mar 25 '21 10:03 stephanegigandet

Elastic Search

teolemon avatar Jul 28 '22 09:07 teolemon

https://www.elastic.co/

M123-dev avatar Aug 03 '22 13:08 M123-dev

New https://github.com/openfoodfacts/openfoodfacts-search/ project should tackle this…

alexgarel avatar Sep 06 '22 13:09 alexgarel

@alexgarel what is the current status of off-search, when do you think it's ready to be tested

M123-dev avatar Sep 07 '22 16:09 M123-dev

@M123-dev I'm working on deploying it to stagging, see https://github.com/openfoodfacts/openfoodfacts-search/pull/17

alexgarel avatar Sep 09 '22 13:09 alexgarel

Perfect, then we can directly try it out in smoothie using dev mode

M123-dev avatar Sep 09 '22 13:09 M123-dev

This issue has been open 90 days with no activity. Can you give it a little love by linking it to a parent issue, adding relevant labels and projets, creating a mockup if applicable, adding code pointers from https://github.com/openfoodfacts/openfoodfacts-server/blob/main/.github/labeler.yml, giving it a priority, editing the original issue to have a more comprehensive description… Thank you very much for your contribution to 🍊 Open Food Facts

github-actions[bot] avatar Feb 02 '24 00:02 github-actions[bot]