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 SAGAR PALAO <sa...@gmail.com> on 2018/08/08 02:18:46 UTC
Translating SQL having clause in Solr query
Hi Guys,
I am new to the Solr world and I am using Solr 5.4.1. I have a question and
hope to find answer to the same.
Consider a SQL query as:
select A, sum(B), sum(C)
from Col1
where D = ‘Test’
group by A
*having sum(B) > 20*
order by A
limit 100
I am able to translate the above to Solr Query partially using pivot facet.
But how do I have the having clause implemented in my Solr Query. Without
having clause in place the number of records is too large and so the
pivoting on A is returning a very large result. In addition the number of
distinct value for A is also very high.
Please advice me how to solve this problem.
P.S. It is not possible for me to use Solr SQL of Solr 6 which allows above
SQL to execute.
Regards,
Sagar Palao