Move 'search' to the registry subsystem

This continues the effort to separate all registry logic from the deprecated `Server` object.

This depends on #5427, please review that first.