On Fri, 2016-03-11 at 12:11 +0800, Zheng Lin Edwin Yeo wrote: > I would like to check, will using the results grouping with group.ngroups > (which will include the number of groups that have matched the query) in > the search affects the performance of the Solr?
Yes. Calculating ngroups is done by collecting all the groups in a shard. They are kept as BytesRefs, which means a lot of lookups plus memory overhead proportional to the ngroups count. > I required the value of the number of groups that have matched the query. > Besides this, is there other way which I can retrieve that value? JSON Facets has numBuckets which is fast, but might not be accurate: https://issues.apache.org/jira/browse/SOLR-8741 StatsComponent has countDistinct which is accurate, but has a warning that is might be very heavy. If you want accurate counts and if you are using SolrCloud, each shard must return the full list of values, independent of whether you use grouping, faceting or stats. Depending on cardinality this can be very heavy. > I have more than 10 million documents, with an index size of more than > 500GB, and I'm using Solr 5.4.0. - Toke Eskildsen, State and University Library, Denmark