upsert in Set and indexes