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 Zheng Lin Edwin Yeo <ed...@gmail.com> on 2017/02/28 11:36:39 UTC
Having clause in Faceting
Hi,
Would like to check, how can we put the having clause (having sum(fieldC) >
1000) in the following example in Solr Facet or JSON Facet query?
I'm using Solr 6.4.1.
select fieldA, fieldB, count(*), sum(fieldC), avg(fieldY)
from collection1
where fieldC = 'term1 term2'
group by fieldA, fieldB
having sum(fieldC) > 1000
order by sum(fieldC) asc
limit 100
Regards,
Edwin
Re: Having clause in Faceting
Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
Hi,
Is it possible to do this Having Clause in Solr Facet or JSON Facet query?
Regards,
Edwin
On 28 February 2017 at 19:36, Zheng Lin Edwin Yeo <ed...@gmail.com>
wrote:
> Hi,
>
> Would like to check, how can we put the having clause (having sum(fieldC)
> > 1000) in the following example in Solr Facet or JSON Facet query?
>
> I'm using Solr 6.4.1.
>
> select fieldA, fieldB, count(*), sum(fieldC), avg(fieldY)
>
> from collection1
>
> where fieldC = 'term1 term2'
>
> group by fieldA, fieldB
>
> having sum(fieldC) > 1000
>
> order by sum(fieldC) asc
>
> limit 100
>
>
> Regards,
> Edwin
>
>