api search function works in query view