Collect all items containing a word to a Multimap
Well, if your items has no null elements, you can use ImmutableSetMultimap#flatteningToImmutableSetMultimap collector and it's own inverse method instead of calling utility methods.

return items.stream()
        .collect(flatteningToImmutableSetMultimap(
                i -&gt; i,
                i -&gt; i.wordSet().stream()
        ))
        .inverse();


It's a bit more terse (note the static import, which in my team we agreed is acceptable, although we normally don't use static imports) as it repeats looong class name in method name) and gives you immutable multimap right away.

If some "flattening" version of Multimaps#index existed, you could have also used it, but there's no such method right now unfortunately.