Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 340F0970A for ; Tue, 7 Feb 2012 03:03:57 +0000 (UTC) Received: (qmail 26800 invoked by uid 500); 7 Feb 2012 03:03:53 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 26420 invoked by uid 500); 7 Feb 2012 03:03:51 -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 26364 invoked by uid 99); 7 Feb 2012 03:03:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 03:03:50 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of johannes.goll@gmail.com designates 74.125.82.176 as permitted sender) Received: from [74.125.82.176] (HELO mail-we0-f176.google.com) (74.125.82.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 03:03:42 +0000 Received: by werf1 with SMTP id f1so6883109wer.35 for ; Mon, 06 Feb 2012 19:03:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=PDsmdUHk3QWyys8Qiz03xUkzlNXtWbzIMW7Zuv8pMeM=; b=LeMmsCuGizZgFhvH21JXjifbTDQiBdn42cQAyO6FJDzz29vJaxZEQGJbs0U/7pGSb+ a9kroFdzzp5nIDfHvMfyzuDzHuCLX/Vm5GArVc8gQN4d5w8eEGFU+UKwNUgN29NSCZor yGdi0kGnPZbLJRE0+a6wvknvi1G/BQuO72CCE= MIME-Version: 1.0 Received: by 10.216.131.39 with SMTP id l39mr4337344wei.4.1328583801803; Mon, 06 Feb 2012 19:03:21 -0800 (PST) Received: by 10.180.95.193 with HTTP; Mon, 6 Feb 2012 19:03:21 -0800 (PST) In-Reply-To: References: Date: Mon, 6 Feb 2012 22:03:21 -0500 Message-ID: Subject: Re: summing facets on a specific field From: Johannes Goll To: solr-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org you can use the StatsComponent http://wiki.apache.org/solr/StatsComponent with stats=true&stats.price=category&stats.facet=category and pull the sum fields from the resulting stats facets. Johannes 2012/2/5 Paul Kapla : > Hi everyone, > I'm pretty new to solr and I'm not sure if this can even be done. Is there > a way to sum a specific field per each item in a facet. For example, you > have an ecommerce site that has the following documents: > > id,category,name,price > 1,books,'solr book', $10.00 > 2,books,'lucene in action', $12.00 > 3.video, 'cool video', $20.00 > > so instead of getting (when faceting on category) > books(2) > video(1) > > I'd like to get: > books ($22) > video ($20) > > Is this something that can be even done? Any feedback would be much > appreciated. -- Dipl.-Ing.(FH) Johannes Goll 211 Curry Ford Lane Gaithersburg, Maryland 20878 USA