Filters fields by permissions and 'limit results to fields' option. Also applies the sorting.
I'll add highlighting here as well asap.