Not that i am aware of to sort by numBuckets but how much difference it
make if you sort by count. For e.g. below result is sorted by inner count
and numBuckets in this example has same order.
curl http://localhost:8983/solr/techproducts/query -d 'q=*:*&rows=0&
json.facet={
Hi,
According to http://yonik.com/solr-facet-functions/, we can sort on "any
facet function that appears in each bucket":
$ curl http://localhost:8983/solr/query -d 'q=*:*&
json.facet={
categories:{
type : terms,
field : cat,
sort : "x desc", // can also use sort:{x:desc}