Node.js package that synchronizes MongoDB collections with Elasticsearch indices by tailing the MongoDB oplog. Supports one-to-one and one-to-many mappings, attachment sync, and filtering. Compatible with Elasticsearch 6.x and MongoDB 3.6+. Currently at version 2.1.35, with no recent updates. Requires a MongoDB replica set. Key differentiator: real-time sync via oplog tailing without additional middleware.
npm install es-mongodb-syncNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes the MongoDB to Elasticsearch sync connector with Oplog tailing configuration.
Deploy a replica set for your MongoDB instance.
Use package with Elasticsearch 7+ support or manually adapt the code.
Use require() instead of import.
Create a 'crawlerData' directory in your project root and place the config JSON file there.
Use const MongoESConnector = require('es-mongodb-sync'); and call MongoESConnector.initConn(...).Convert MongoDB to a replica set by adding 'replication' config and restarting mongod.
Ensure Elasticsearch is running on the specified host:port and the URL is correct.