Workaround of extracting doc id as r_id: