Sort and color-code documents by entity type