Incude comments in search

Whether you put custom code in your theme’s functions.php or in a plugin, you’re still using custom code. So I’m going to ignore your “without a plugin” requirement and instead suggest these two plugins:

There is absolutely no reason to use custom functionality in functions.php rather than a plugin. When you’re asking for such advanced/complex functionality as a global search, that requirement becomes a huge limitation and will prevent you from ever finding the answer you’re looking for.

If you’re still hung up on not using a plugin, you might want to offload the actual search to another engine like Google. In that case, this video tutorial on integrating a custom Google search might be useful.