Updated function score query to allow a filter as well as a query.