allow a document frequency index to be passed to invertIndex