add interface for the consumers and init index for the doc