Use Tags to initiate Search

I used a workaround for now. I eddited the category_template.php with the str_replace function. The problem turned out to be that the Tag Cloud used diffenten functions than the regular Tags. I just added this:

foreach ( $tags_data as $key => $tag_data ) {

$class = $tag_data['class'] . ' tag-link-position-' . ( $key + 1 );
 $a[] = "<a href="" . str_replace("/index.php/tag/","/index.php/search/",esc_url( $tag_data["url'] )) .(...)
}

to wp_generate_tag_cloud() and this:

$the_tags = str_replace("/index.php/tag/","/index.php/search/",$the_tags);

to the_tags(). As stated bevor I’m new to this and I dont think thats the way it should be but it works for now. I used it with the BeTube Theme if anyone wants to use this as well.

Thanks for your answers.