On Thu, Apr 9, 2009 at 2:17 PM, Andrey Klochkov
<akloch...@griddynamics.com>wrote:

>
> So we're searching through the product catalog. Product have types (i.e.
> "Electronics", "Apparel", "Furniture" etc). What we need is to customize
> scoring of the results so that top results should contain products of all
> different types which match the query. So after finding all the products
> matching the query we want to group results by product type.


This is something similar to Field Collapsing. It is not committed to trunk
but there are a few patches.

https://issues.apache.org/jira/browse/SOLR-236


> Then for every
> product type take corresponding sub-set of results and in every of the
> sub-sets assign scores with the following logic. Assign score 5 to the
> first
> 20% of results, then assign score 4 to the next 15% of results, and so on.
> Particular percent values are configured by the end user. How could we
> achive it using Solr? Is it possible at all? Maybe we should implement some
> custom ValueSource and use it in a function queries?
>

Such kind of scoring is not possible out of the box. You need to assign
scores according to where the document lies in the final list of results
(after all filters are applied), therefore you may not be able to operate on
the DocList directly or in the value source. I *think* a good place to start
looking would be the QueryValueSource in trunk as it has access to the
scorer. But I do not know much about these things.
-- 
Regards,
Shalin Shekhar Mangar.

Reply via email to