feat(filter): enable dynamic filters on resource

let resource define a filter as a callback which can use
request specific data to do further filtering.
fix(sort): use default score sort when there is a query

instead of using the default sort set for resource.