Uses all the ancestors of each term to create the full materialized path of the hierarchy, to be used in sorting.