add isinf condition for termscore