I've already add this function in [my fork](https://github.com/EagleChen/go-mysql-elasticsearch). I can send a pull request if you want to add this.