maybe throw an exception here if cacheDocFreqs is false?