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 27A0418A8B for ; Wed, 16 Sep 2015 15:40:42 +0000 (UTC) Received: (qmail 81759 invoked by uid 500); 16 Sep 2015 15:40:27 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 81518 invoked by uid 500); 16 Sep 2015 15:40:27 -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 81450 invoked by uid 99); 16 Sep 2015 15:40:27 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Sep 2015 15:40:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 0F314180976 for ; Wed, 16 Sep 2015 15:40:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.213 X-Spam-Level: * X-Spam-Status: No, score=1.213 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 8CeOdf28P8Ds for ; Wed, 16 Sep 2015 15:40:16 +0000 (UTC) Received: from mail-ig0-f177.google.com (mail-ig0-f177.google.com [209.85.213.177]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 521DB203A0 for ; Wed, 16 Sep 2015 15:39:57 +0000 (UTC) Received: by igbni9 with SMTP id ni9so34493048igb.0 for ; Wed, 16 Sep 2015 08:39:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=aSNhrjQGr89bFBFmLu3kIEdbF+LZ0r0Fa/mqjS3N2I4=; b=xjzGxE3KcloTeafKae3HxW/UbQ8iZvYmDeB0b+5apPG348cAAJDSu/UTgaXexMO4Tm FNAAE5/seQFUJKSo7JBz3BLrTpXErtxSKd1aRkPZHo7IO0dIYMSUpgG4Z+K4QqOJBXYt Bb22E2pTerjkpOuHPt1u5reK1BxnBWbZFvfuYblIaBpvO1Kv1BU0oJq8ktGPVtzqO9MF /Jt3oV1J8apalOhpdEHJtQzxRfqCenAeBDn9BfGIFj8OxMKxp1zxP5b7TBH5TbnXY3V/ cvv5Nf5wmmIK1uZjGRfZF7fxd6GdMwFHvLo2ri7lrQw51V+hmIHOobuPdqQhRiqjZkzb +NbQ== MIME-Version: 1.0 X-Received: by 10.50.62.179 with SMTP id z19mr16655645igr.57.1442417990155; Wed, 16 Sep 2015 08:39:50 -0700 (PDT) Received: by 10.107.9.93 with HTTP; Wed, 16 Sep 2015 08:39:50 -0700 (PDT) In-Reply-To: <1442318421923-4229183.post@n3.nabble.com> References: <1442318421923-4229183.post@n3.nabble.com> Date: Wed, 16 Sep 2015 08:39:50 -0700 Message-ID: Subject: Re: Generating a document by group count and displaying the result From: Erick Erickson To: solr-user@lucene.apache.org Content-Type: text/plain; charset=UTF-8 Have you looked at the group by options? See: https://cwiki.apache.org/confluence/display/solr/Result+Grouping Best, Erick On Tue, Sep 15, 2015 at 5:00 AM, Sreekant Sreedharan wrote: > I have a requirement to group documents by count based on a particular field: > > So for example if you have the following three documents: > > 1 > food > car > > > 2 > travel > car > > > 3 > food > car > > > A search with the query string 'car' based on a grouping based on the > 'category' field should return something like: > > > 1 > food > car > 2 > > > 2 > travel > car > 1 > > > 3 > food > car > 2 > > > Is this possible? > > Regards, > Sreekant > > > > -- > View this message in context: http://lucene.472066.n3.nabble.com/Generating-a-document-by-group-count-and-displaying-the-result-tp4229183.html > Sent from the Solr - User mailing list archive at Nabble.com.