Server-side product indexing and search - Technical Specs

From Open Food Facts wiki
Revision as of 16:02, 29 June 2020 by Stephane (talk | contribs)
Jump to navigation Jump to search

Summary

This page contains the technical specifications for the Server-side product indexing and search task of the Project:Personalized_Search project.

It lists the options we are considering and the one we choose.

Server-side sort order pre-computation

The current API returns results sorted by last modified date.

For the Personalized Search project, we will pre-compute for each product a query independent sort key based on:

  • data completeness: how much key data we have for the product
  • data quality: how confident we are that the data is correct and up-to-date
  • product quality: how high is the overall quality of the product (e.g. nutritional quality)
  • product popularity: how popular the product is

The search API will return a large number of products (e.g. 100 products) that match the query and order them with this pre-computed key.

The Products::compute_sort_keys() function computes the popularity_key key.

Search API

Search by category

Currently working:

Possible change of syntax for filters:

  • categories=some category name, or categories=en:some-category-id

Search by keyword

Currently working: