Fix search method

- Added the missing query paramter
- Unit tests