Server-side product indexing and search

From Open Food Facts EN
Jump to navigation Jump to search


Server-side product similarity indexing and search is the 2nd of the 4 sub-tasks of the Project:Personalized_Search funded by the NGI0 Discovery Fund managed by NlNet.

This page documents the progress made in Q2 2020.



Diagram source:

  1. The Open Food Facts mobile app (and 3rd party apps) make generic search requests that do not contain user preferences
  2. The server returns a big number of generic results
  3. The app uses the user preferences stored locally to personalize the search results

Research and specifications

At the start of the project, we evaluated the different options for server-side product indexing and search:

New Search API

The existing Open Food Facts search API is outdated and hacky (it was built on top of the OFF web site search form and is unnecessarily convoluted) and does not support some of the requirements for the Personal Search project (in particular being able to retrieve a given set of products using their barcodes).

We are thus creating a new Open Food Facts Search API Version 2 that will be simpler but also more powerful.

New Product Attributes

We will also create new Product Attributes that will allow clients (like apps but also the OFF web site) to easily filter and rank search results according to the user preference, and to explain to users how well the products match their preferences.