make mysql and ealstic search have the same API