Difference between revisions of "Server-side product indexing and search - Technical Specs"
Jump to navigation
Jump to search
(Created page with "== Summary == This page contains the technical specifications for the Server-side product indexing and search task of the Project:Personalized_Search project. It li...") |
|||
Line 16: | Line 16: | ||
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 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 API == | ||
=== Search by category === | === Search by category === | ||
+ | |||
+ | Currently working: | ||
+ | * https://fr.openfoodfacts.org/cgi/search.pl?action=process&tagtype_0=categories&tag_contains_0=contains&tag_0=en%3Acookies&sort_by=popularity_key&page_size=20&action=display | ||
+ | |||
+ | Possible change of syntax for filters: | ||
+ | * categories=some category name, or categories=en:some-category-id | ||
=== Search by keyword === | === Search by keyword === | ||
+ | Currently working: | ||
+ | * https://fr.openfoodfacts.org/cgi/search.pl?action=process&search_terms=soda&sort_by=popularity_key&page_size=20&action=display&json=1 | ||
[[Category:Project:Personalized_Search]] | [[Category:Project:Personalized_Search]] |
Revision as of 16:02, 29 June 2020
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: