Refactored create index api to make use of the new recently introduced generic ack mechanism

Closes #4421