Identity Rule to generate userid

I found another post where it says that uid and email are searchable attributes for identities. So it left to verify and send to ES. Anyway, if someone want to share some experience it will be appreciated.

Mentioned post is: