Provide a SearchContext for DeleteByQuery

Fixes #2705