If add overwrites it should be called `setInvertedIndex` instead.