Document grouping rules.