Admin search ACF relationship

Here is a code snippet that will do what you described:

add_action( 'pre_get_posts', 'wpsx_185734_acf_search_relationship' );
function wpsx_185734_acf_search_relationship( $q ) {
  $screen = get_current_screen();
  $s = $q->get('s');
  $post_type = $q->get('post_type');

  // Be very selective when running code at the pre_get_posts hook
  if (
    ! is_admin() || empty( $s ) || ( isset( $screen->post_type ) &&
    'story' != $screen->post_type ) || 'story' != $post_type
  ) {
    return;
  }

  // get all artists that match the search parameter $s
  $found_artists = get_posts( array(
    'post_type' => 'artist',
    'nopaging' => true,
    's' => $s,
    'fields' => 'ids'
  ) );

  // build a meta query to include all posts that contains
  // the matching artist IDs in their custom fields
  $meta_query = array();
  foreach ( $found_artists as $artist_id ) {
    $meta_query[] = array(
      'key' => 'select_artist', // name of custom field
      'value' => '"' . intval($artist_id) . '"',
      // ^^ matches exactly "123", not just 123. This prevents a match for "1234"
      'compare' => 'LIKE'
    );
  }
  $q->set( 'meta_query', $meta_query );
  $q->set( 's', '' ); // unset the original query parameter to avoid errors
}

The code above assumes you have registered the custom post types and added an ACF relationship field named “select_artist” assigned to the story post type.

I created a public gist that also contains the code to register the custom post types and field group so it will run as a stand-alone-plugin: https://gist.github.com/jancbeck/fdd8f0c796778f6263d0