take care of query type in search_tasks