Build a complete index from an array of entries in O(n) time.
Unlike calling addArticleToIndex in a loop (which clones maps on every
call, yielding O(n²) behaviour), this function mutates local maps in a single
pass and returns a final immutable index.
Build a complete index from an array of entries in O(n) time.
Unlike calling addArticleToIndex in a loop (which clones maps on every call, yielding O(n²) behaviour), this function mutates local maps in a single pass and returns a final immutable index.