the core search code (lib and tasks)