Ancestry indexing