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 naga pradeep dhulipalla <na...@gmail.com> on 2019/01/28 11:06:24 UTC
Aggregate functions
Hi Team,
Can we use SUM aggregate function in our SOLR queries. If not is there an
alternative to achieve this.
My sample query looks like this as mentioned below.
Select duration from tableName where solr_query='{"q":"(appName:\"test\")"}'
I need the aggregate SUM value of duration column. Thanks for your quick
help.
Regards
Pradeep
+917204007740
Re: Aggregate functions
Posted by naga pradeep dhulipalla <na...@gmail.com>.
Hey,
Thanks for the reply. I had gone through the link but unable to understand
how can i use facets in the following query
Select duration from tableName where solr_query='{"q":"(appName:\"test\")"}'
I want the query something like
Select SUM(duration) from tableName where solr_query='{"q":"(appName:\"
test\")"}'
Can you help on this.
On Mon, Jan 28, 2019 at 5:55 PM Scott Stults <
sstults@opensourceconnections.com> wrote:
> Yes. Have a look at the Facet API:
> https://lucene.apache.org/solr/guide/7_5/json-facet-api.html
>
>
> On Mon, Jan 28, 2019 at 6:07 AM naga pradeep dhulipalla <
> naga.pradeep9@gmail.com> wrote:
>
> > Hi Team,
> >
> >
> >
> > Can we use SUM aggregate function in our SOLR queries. If not is there an
> > alternative to achieve this.
> >
> > My sample query looks like this as mentioned below.
> >
> >
> >
> > Select duration from tableName where
> > solr_query='{"q":"(appName:\"test\")"}'
> >
> >
> >
> > I need the aggregate SUM value of duration column. Thanks for your quick
> > help.
> >
> >
> >
> > Regards
> >
> > Pradeep
> >
> > +917204007740
> >
>
>
> --
> Scott Stults | Founder & Solutions Architect | OpenSource Connections, LLC
> | 434.409.2780
> http://www.opensourceconnections.com
>
Re: Aggregate functions
Posted by Scott Stults <ss...@opensourceconnections.com>.
Yes. Have a look at the Facet API:
https://lucene.apache.org/solr/guide/7_5/json-facet-api.html
On Mon, Jan 28, 2019 at 6:07 AM naga pradeep dhulipalla <
naga.pradeep9@gmail.com> wrote:
> Hi Team,
>
>
>
> Can we use SUM aggregate function in our SOLR queries. If not is there an
> alternative to achieve this.
>
> My sample query looks like this as mentioned below.
>
>
>
> Select duration from tableName where
> solr_query='{"q":"(appName:\"test\")"}'
>
>
>
> I need the aggregate SUM value of duration column. Thanks for your quick
> help.
>
>
>
> Regards
>
> Pradeep
>
> +917204007740
>
--
Scott Stults | Founder & Solutions Architect | OpenSource Connections, LLC
| 434.409.2780
http://www.opensourceconnections.com