Removing irrelevant documents