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 Ankit Jain <an...@gmail.com> on 2014/12/03 15:54:01 UTC

Group by on multiple fields and Stats Solr

Hi All,

I need to perform the following queries into Solr:

SELECT a, b, Sum(a) FROM tbl GROUP BY a, b.

-- 
Thanks,
Ankit Jain

Re: Group by on multiple fields and Stats Solr

Posted by Erick Erickson <er...@gmail.com>.
And what does this have to do with Search ;)

Seriously, databases were built through a lot
of very hard work by some very smart people
to accomplish their jobs. Solr is a search
engine. Trying to make one do the job of the other
is usually a frustrating experience.

If you must do this, take a look at pluggable
analytics (if you require distributed supports)
or "hanging stats off pivot faceting"
https://issues.apache.org/jira/browse/SOLR-6351
which is only on trunk/5x etc.

Best,
Erick

On Wed, Dec 3, 2014 at 6:54 AM, Ankit Jain <an...@gmail.com> wrote:
> Hi All,
>
> I need to perform the following queries into Solr:
>
> SELECT a, b, Sum(a) FROM tbl GROUP BY a, b.
>
> --
> Thanks,
> Ankit Jain