Add test for search query with reference column