lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martijn v Groningen <>
Subject Re: Re: Group by on multi fields
Date Fri, 14 Dec 2012 14:40:30 GMT
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.


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 : select a1,a2,sum(a3)
group by a1,a2;
> BTW: show me how to do is well too, Thank you。
> ---------------------------------------------------------------------------------------------------
> Confidentiality Notice: The information contained in this e-mail and any accompanying
> is intended only for the use of the intended recipient and may be confidential and/or
privileged of
> Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication
> not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure
or copying
> is strictly prohibited, and may be unlawful.If you have received this communication in
> immediately notify the sender by return e-mail, and delete the original message and all
copies from
> your system. Thank you.
> ---------------------------------------------------------------------------------------------------

Met vriendelijke groet,

Martijn van Groningen

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message