Revert "index: use utils.emit for data"

This reverts commit 363f584ab8c00edfc7624a0b7b1c2bda8b153c7e.
Revert "plugins/server: fixed test"

This reverts commit e689be501efbd07edde0bb394a6d67113dbb05d9.