adding code to filter only collection results in the apache results hook