I don't know if this is possible for you but: could you pre-process the group and create nested documents with pre-computed document counts ?
https://cwiki.apache.org/confluence/display/solr/Uploading+Data+with+Index+Handlers?focusedCommentId=48792150#UploadingDatawithIndexHandlers-NestedChildDocuments Ludovic. ----- Jouve France. -- View this message in context: http://lucene.472066.n3.nabble.com/Get-groups-which-has-the-number-of-elements-greater-than-tp4174352p4174698.html Sent from the Solr - User mailing list archive at Nabble.com.