separate search itself from the database