Reputation: 9400
My documents are typical e-commerce catalog products, let's say soccer boots.
Here's a fields subset:
My sort criteria now is: new desc, sold_units desc, available_units desc
.
I want to show "new" products firts, then best-sellers, then highest inventory products.
That works, but using 'sort' parameter, text relevance (score) is completely lost. I get new products, best-sellers.... definitely not satisfying my search query.
(e.g. I search for 'Nike Mercurial', and get 'Nike Hypervenom' products as first results, because they're best-sellers)
I'm looking for a way to "combine" Solr search score with sort fields.
I think that's a "boost" matter, isn't it? I mean building a function taking (score, new, sold_units) as arguments and use it for sorting.
Do you have any suggestion to help me, or at least an idea on how to proceed? Thanks
--- EDIT ---
I do believe that boosting is the solution.
My /select search handler uses edismax parser by default, so my boost field gets the job done:
boost=sum(1,product(1,sold_units))
What if I need boosting on MULTIPLE fields (the boolean 'new', too) ?
Upvotes: 1
Views: 1227
Reputation: 3209
sum
will take multiple arguments. It might be helpful to start out modeling your boost as a sum of weighted products. Eg: boost = Ax + By + Cz where (x,y,z) = (new,sold,available) with A, B, and C being the constants you infer to weight these features appropriately for your definition of relevance.
Your boost
function, applied to an edismax query, is just multiplied by the text match score to generate the final score used in ranking results. So when coming up with your boost function, the goal is usually to “subtly” (not dramatically) influence text-match scores that are already fairly close.
You might also look at tools like Quepid.com to help you assess the results of your changes for your top queries.
Upvotes: 3