nested hashmap for storing all terms in all docs