derivequery: pass search filter to query

This patch corrects derived queries.