The namespace of ke_search has changed in version 4. Please use tpwd/ke_search_hooks if you use ke_search version 4 or higher:
https://github.com/tpwd/ke_search_hooks
ke_search_hooks contains an example for a custom indexer.
It indexes records from the extension "News" (ext:news).
Please feel free to use it as a kickstarter for your own indexer.