Customization of the query should happen before filtering.