: I have a problem of returning an list of results which is sorted on a
: average of ranks returned from aggregates.
: the qury would be something like ?
: q=product:p1+product:p2+product:p3; sort score desc
: To explain Supose I have documents with fields Product, Manufacturer, Rank
: and I want to return the top manufacturers across products p1,p2,p3 with
: highest average rank on these products.

the topic of generating statistics on facet constraints has come up before 
... but nothing for doing that is provided out of the box at the moment. 

while basic stats like the min/mean/median/stddev/max of a numeric facet 
field (in the context of a q/fq) would be relativeily straight forward to 
add to Solr's built in simple facet support; more complex types statistics 
(like hat you describe) would be difficult to implement in a way that 
would be generally reusable through simple query params ... however: it 
would probably be fairly straightfoward to implemnt domain specific stats 
like this directly in a custom plugin.

The new SearchComponents framework available in the trunk would probably 
be an easy way to do this, allthough it's not very well documented at the 
moment.  If you lok at the existing FacetComponent however, seeing how it 
generates facet counts, and extending it to know about your specific 
fields and generate the type of stats you want should be possible.  




-Hoss

Reply via email to