Custom Search Type – Search

I'm trying to search in my custom publishing types. I'm using this code that uses debug, I know it's fired.

function search_post_type($wp_query) {
    if (is_search()) {
        $wp_query->set('post_type', array("myposts"));
add_filter('pre_get_posts', 'search_post_type');

However, the search only looks for the default publication types, ignoring myposts – which is the only one I want it to search for.

Where is the actual search done (data queried) so that I can check if the custom publication type reaches the right place?

Thank you