Is there a way to configure solr statscomponent http://bit.ly/T4PLnl to NOT include the "expensive" sumOfSquares and stddev ?
We only need sum, min,max,mean,count and missing.
Use the AnalyticsComponent , which supports the following:
Usage:
Turning it on Parameter Default Description olap=[true/false] Enable enhanced analytics functionality
References
This is something I tried once. All I cared about was sum, count, and missing, and still profiling showed that the stats are so cheap to compute as to be free. Consider that sumOfSquares requires O(1) space and O(n) time, the same as sum, min, max, mean, count, and missing. Whether you compute sumOfSquares or not, StatsComponent still has to iterate over the result set and fetch the field value for each doc. ParseDouble is overwhelmingly the hotspot for non-faceted stats, at least if you're using a string field!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.