Use map-reduce index to build up statistics