You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by stockiii <st...@gmail.com> on 2010/10/26 15:42:36 UTC

FieldCollapsing and Stats or Sum ?!

Hello.

we want to group with field collapsing and we want a sum of this groups.

in example:
group by currency_id: EUR, CHF, ...
and for this groups, the correct sum of the documents from the field: amount

ist this in one Request possible ? or its necessary do this in several
requests ? 
maybe first grouping and then using the statsComponent to get the sum of the
group by sending a new request with the filter ? but then i dont need
grouping !?!? 

thx =)
-- 
View this message in context: http://lucene.472066.n3.nabble.com/FieldCollapsing-and-Stats-or-Sum-tp1773842p1773842.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: FieldCollapsing and Stats or Sum ?!

Posted by stockiii <st...@gmail.com>.
okay. 

i want one number per group. yes its similar to the "group by" command.

is there another way to get this ? 
-- 
View this message in context: http://lucene.472066.n3.nabble.com/FieldCollapsing-and-Stats-or-Sum-tp1773842p1778731.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: FieldCollapsing and Stats or Sum ?!

Posted by Lance Norskog <go...@gmail.com>.
Do you want one number, or the sum for each group? For one number, the
stats component is fine.

For one number per group, grouping does not (yet) support the stats
component. This is the old SQL "Group By" command, right?

On Tue, Oct 26, 2010 at 6:42 AM, stockiii <st...@gmail.com> wrote:
>
> Hello.
>
> we want to group with field collapsing and we want a sum of this groups.
>
> in example:
> group by currency_id: EUR, CHF, ...
> and for this groups, the correct sum of the documents from the field: amount
>
> ist this in one Request possible ? or its necessary do this in several
> requests ?
> maybe first grouping and then using the statsComponent to get the sum of the
> group by sending a new request with the filter ? but then i dont need
> grouping !?!?
>
> thx =)
> --
> View this message in context: http://lucene.472066.n3.nabble.com/FieldCollapsing-and-Stats-or-Sum-tp1773842p1773842.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Lance Norskog
goksron@gmail.com