Optimize the bm25 algorithm by avoiding frequency calculations.
