Beginner(?) question: why is the model
map<term_id,
list<pair<document_id, positions_idx>>
> inverted_index;
and not map<term_id,
map<document_id, list<positions_idx>>
> inverted_index;
(or using set<> in lieu of list<> as appropriate)?