How to map vertex index to material slot?

Ooops, no I havent solved this. I moved off it after getting stuck.