search: add a test case for sub records in complex