indexItemsByTheirId and linkSiblingsAndCousins