adding mapreduce functions for search collection