switched db and fixed search for postgres