Add save function to repository class, fixes #5743

Allows to update the repository in the search index from there
in order to get the i18n values updated