How to set parameters for search loop?

You can modify search query and set your parameters with the help of pre_get_posts.
Like this.

function wpse_custom_get_posts( $query ) {
  if ( is_admin() || ! $query->is_main_query() )
    return;

  if ( $query->is_search() ) {
    $query->set( 'post_status', 'publish' );
  }

}
add_action( 'pre_get_posts', 'wpse_custom_get_posts', 1 );