cleanup: use hed_cursor_t in search_data()