I want to the sum of count of unique values of a field in solr.
My original requirement is like this: I have a collection in solr cloud, spread across multiple shards from which I have to get the list of unique values of the field(let's say abc), which has duplicate values. And the sorting of the search results should be such that the value having the maximum occurance should be at the top and least occurance should be at the bottom.
I have been able to achieve this requirement by the below query and it works totally fine.
http://localhost:8983/solr/secondcol/select?q=test&wt=json&indent=true&facet=true&facet.field=abc&facet.mincount=1&rows=0&facet.offset=0&facet.limit=10
But I am not able to get the count of the total num of facets returned here. Is there a way to do it.
I am doing this in solr 4.10 and 5.3