Replace documents by their referrers