Implemented basic aggregation based search functions.

6 jobs for migration in 17 minutes and 40 seconds (queued for 2 seconds)