You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Bharat Jain <bh...@gmail.com> on 2010/07/28 08:45:19 UTC

facet total score instead of total count

Hi,
   I have a requirement where I want to sum up the scores of the faceted
fields. This will be decide the relevancy for us. Is there a way to do it on
a facet field? Basically instead of giving the count of records for facet
field I would like to have total sum of scores for those records.

Any help is greatly appreciated.

Thanks
Bharat Jain

Re: facet total score instead of total count

Posted by Chris Hostetter <ho...@fucit.org>.
:    I have a requirement where I want to sum up the scores of the faceted
: fields. This will be decide the relevancy for us. Is there a way to do it on
: a facet field? Basically instead of giving the count of records for facet
: field I would like to have total sum of scores for those records.

Solr doesn't support this -- it wouldn't even make much sense in the case 
of a sorted query where scores might not even be computed, nor is it clear 
that it would make much sense even if the scores were computed in this 
case: would ranking constraint values by total score be meaninful if the 
results were sorted by something completley differet?

you could probably write a custom faceting component that would do this, 
but it might be tricky to make it work with distributed search.

Typically when people have wanted to "rank" facet constraints in some way 
ohter then count, an approximation that tends to work out fairly well is 
to look at the values for the first N docs of the current sort (where N 
may or may not be the same as the size of your pagination).



-Hoss