function to select run_key and index by adaptor; intermediate