In the WordPress default search, custom post types are not included in search results. So in order to include custom post types in the search result, we have two methods: one using custom code in your theme functions.php file and second using third party free WordPress plugin.
Custom Method
You can include custom post types in the search result by adding below function in your functions.php file.
Using WP Extended Search WordPress Plugin
To include Custom Post Types in WordPress Search, you can also use third party free WordPress Plugin WP Extended Search. WP Extended Search provided the feature to include/exclude Tags, Categories, Custom Post Types, Taxonomies, and Custom Meta Keys in default WordPress Search.
You can read in brief about the usage and features of WP Extended Plugin in my post: How to Improve WordPress Search with WP Extended Search.

2 responses
Running this in the WP admin posts search I get
Notice: Array to string conversion in D:\wwwroot\enhabit\wp-admin\edit.php on line 327
Hi Adam,
The notice message you showed doesn’t seem related to the code in the post. Can you be more specific about the issue that you are having, so that I can help you with the issue?