fixed getTermFrequency so that search suggestions work again