EasySearch searching by many to many related object

Say you have two collections(e.g. Item, ItemType), and a collection representing the m2m relationship, ItemTypeXref(an item can have multiple types).

I’m currently using EasySearch for searching. How would you modify an index to be able to account for “Give me all items that are of type A” - that is, filter items where itemTypeXref contains that item id and the id of ItemType A.