get the rank of the type matched as an extra column
get the rank of the type matched as an extra column