lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martijn v Groningen <martijn.v.gronin...@gmail.com>
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.

Martijn

On 11 December 2012 02:55, dizh <dizh@neusoft.com> 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
attachment(s)
> 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
is
> 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
error,please
> 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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message