smart search in local db