Return-Path: Delivered-To: apmail-lucene-solr-user-archive@locus.apache.org Received: (qmail 40670 invoked from network); 17 Mar 2008 13:45:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Mar 2008 13:45:57 -0000 Received: (qmail 89221 invoked by uid 500); 17 Mar 2008 13:45:53 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 88762 invoked by uid 500); 17 Mar 2008 13:45:52 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 88753 invoked by uid 99); 17 Mar 2008 13:45:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2008 06:45:52 -0700 X-ASF-Spam-Status: No, hits=3.2 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.233.166.177] (HELO py-out-1112.google.com) (64.233.166.177) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2008 13:45:12 +0000 Received: by py-out-1112.google.com with SMTP id z74so6070518pyg.9 for ; Mon, 17 Mar 2008 06:45:22 -0700 (PDT) Received: by 10.35.83.20 with SMTP id k20mr294536pyl.35.1205761501802; Mon, 17 Mar 2008 06:45:01 -0700 (PDT) Received: by 10.35.81.14 with HTTP; Mon, 17 Mar 2008 06:45:01 -0700 (PDT) Message-ID: Date: Mon, 17 Mar 2008 19:15:01 +0530 From: "Umar Shah" To: solr-user@lucene.apache.org Subject: sorting on aggregate averages MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8884_23986149.1205761501773" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_8884_23986149.1205761501773 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, 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. One way is to create a store of search results and then group and compute the average and sort the result. Can it be done from lucene/ solr itself? if so how? umar ------=_Part_8884_23986149.1205761501773--