HCLTech interview question

Write code for Secondary index usage