aviyelverse / Open-Source-Requests

A curation of paid and unpaid requests for the community to work on.
18 stars 4 forks source link

Ranking based on Relevance and Popularity connected to Override #52

Open ghost opened 2 years ago

ghost commented 2 years ago

If the user searches "environmentally friendly cotton t-shirts". I want to be able to re-rank the results to boost the more environmentally friendly products. (perhaps using sort_by with buckets)

override = {
"rule": {
"query": "environment",
"match": "contains"
},
"sort_by"="_text_match(buckets: 10):desc, environment_score:desc"
}

P.S. At the same time it would also be very useful if you could apply overrides to a combination of filterable attributes as well as the query itself.

e.g.

Apply overrides to an entire product category in combination with a query. So if the user searches for t-shirt and then filters by the material cotton you can apply overides to pin/hide/boost certain items.