put isNewSearchNeeded inside scope so minLength is initialize correctly by minLength