Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DBFAEDCB2 for ; Fri, 14 Dec 2012 14:41:30 +0000 (UTC) Received: (qmail 1845 invoked by uid 500); 14 Dec 2012 14:41:28 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 1253 invoked by uid 500); 14 Dec 2012 14:41:21 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 1197 invoked by uid 99); 14 Dec 2012 14:41:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Dec 2012 14:41:18 +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 martijn.is.hier@gmail.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-ob0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Dec 2012 14:41:11 +0000 Received: by mail-ob0-f176.google.com with SMTP id un3so3436428obb.35 for ; Fri, 14 Dec 2012 06:40:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; bh=TvKLkva00EwM583Oo1xZyERhbK05a0PIDpqbGe7/L/M=; b=qfTNw994S97619UeppFQCq9nOFgr1S4RhDhluxZvJb60TmuA8KhtqaKPENcHJe8d+b T/RGUubXVpyeJ8TMAh5pukuZPAptvA/7PKd5ox4GD0uArqfYRahYUd9Eel1Q3ar8DGyh f5hpndTO79/oR0tzQT6u9bh4tEdS2HzRhJDwDHB65bcGFth5tN4o3xIFCvI8iFCGGBT0 59Re4p+PhOrbyyVwxON6CtdYiV0SVeFitTzb3I++v/8JrkFF2yl6MTBxZmGGhYwlmZR0 5pJSUeYRJnlmeZVYmf2dCnF2cv/fW596dvlshDNRzf0JbuK9XlTPN7+C7bWkAijZJ0pH jocg== Received: by 10.60.170.242 with SMTP id ap18mr4661151oec.97.1355496050792; Fri, 14 Dec 2012 06:40:50 -0800 (PST) MIME-Version: 1.0 Sender: martijn.is.hier@gmail.com Received: by 10.182.127.38 with HTTP; Fri, 14 Dec 2012 06:40:30 -0800 (PST) In-Reply-To: <2012121109554192187542@neusoft.com> References: <5E12F7FD7D58D54DA5542ECC8B14519801FCCE@MSGPEXCHA28B.mfad.mfroot.org> <2012121014124840657336@neusoft.com> <2012121109035967104641@neusoft.com> <2012121109554192187542@neusoft.com> From: Martijn v Groningen Date: Fri, 14 Dec 2012 15:40:30 +0100 X-Google-Sender-Auth: hOkAKQRMJjJ-wpRXCMN6JC3zLjk Message-ID: Subject: Re: Re: Group by on multi fields To: java-user@lucene.apache.org, dizh Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Not that I know of. The easiest way to functionally group across multiple fields is to concatenate multiple field values into a special group field. This isn't a flexible solution, but it doesn't require modifying the Lucene code. The other solution you can try is to group by ValueSource (is like a function) instead by field. At the moment there isn't a concatenate field values function implementation, but you can easily create that yourself. This solution would be flexible (you can change the fields you want to group by during runtime), but the grouping itself will be more expensive (execution wise). I hope this gives you some pointers to start with. Martijn On 11 December 2012 02:55, dizh wrote: > Thanks to Martijn v Groningen. > > but , Is there anyone who has implemented this feature? just like SQL : s= elect a1,a2,sum(a3) group by a1,a2; > > BTW: show me how to do is well too, Thank you=E3=80=82 > -------------------------------------------------------------------------= -------------------------- > Confidentiality Notice: The information contained in this e-mail and any = accompanying attachment(s) > is intended only for the use of the intended recipient and may be confide= ntial and/or privileged of > Neusoft Corporation, its subsidiaries and/or its affiliates. If any reade= r of this communication is > not the intended recipient, unauthorized use, forwarding, printing, stor= ing, disclosure or copying > is strictly prohibited, and may be unlawful.If you have received this com= munication in error,please > immediately notify the sender by return e-mail, and delete the original m= essage and all copies from > your system. Thank you. > -------------------------------------------------------------------------= -------------------------- --=20 Met vriendelijke groet, Martijn van Groningen --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org