openfoodfacts / search-a-licious

🍊🔎 A pluggable search service for large collections of objects (like Open Food Facts)
https://search.openfoodfacts.org
GNU Affero General Public License v3.0
6 stars 4 forks source link

feat: sorting with scripts API #137

Closed alexgarel closed 2 weeks ago

alexgarel commented 4 weeks ago

API to be able to use the sort by scripts API.

Can be tested with:

curl -X POST http://search.localhost:8000/search -H "Content-type: application/json" -d '
{ "q": "brands_tags:auchan", "sort_by": "personal_score", "sort_params": {"preferences": 3}}
alexgarel commented 3 weeks ago

I think we can review and merge this PR (because it also brings a big refactor).

I will do the test interface in another PR.