update the index  when the model is saved