I use MongoDb for storage with an express, Heroku-hosted app.
I would like to provide search capabilities to some MongoDb collections, using ElasticSearch via the Bonsai Heroku add-on.
However, according to the Bonsai faq, Elasticsearch River plugins are not supported.
How can I automatically re-index my MongoDb collections (when a MongoDb document is created/updated/deleted) on Bonsai, using custom mapping, if I cannot use elasticsearch-river-mongodb?
Here is the answer by Bonsai support:
So I made a reindex script inspired by Elaster, which can:
either be called at regular intervals with node-cron;
or be called on demand, following event detection; to trigger events I use mongo-oplog, like so: