Provide universal search from generic pages (like the homepage) and specific search from specific sections
You're catering to two the two main types of users in this regard - those who immediately look for and use the search bar (when the first land on a site) and those who use the navigation first, and only search from deeper levels of the site when they can't navigate to their destination.
Search results on the generic pages can be categorized as you have suggested, and those results on specific pages can be specific to that content.
A searcher from a generic page might not want to see keyword-relevant results from irrelevant categories, but because of the high level of the search, this shouldn't be a problem providing the result categories are clearly distinguished.
A search from a specific page expects to see only results relevant to that category.
You can further strengthen this interaction by having generic language (on labels and prompt/placeholder text) for generic search, and specific language (e.g. 'Search houses')