Changes

Jump to navigation Jump to search
no edit summary
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]]

Navigation menu