improved indexMetadataBuilder