TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: What tool do you use to sync MongoDB with Elasticsearch?

1 pointsby anikdasover 6 years ago
Currently I am performing full text search on MongoDB but I would love to use Elasticsearch for the same. My primary data source is MongoDB. Right now I am not able find a suitable&#x2F;reliable sync tool for MongoDB-&gt;Elasticsearch.<p>There used to be a tool called elasticsearch-river-mongodb [1] which is deprecated now.<p>Also, there is no official logstash input plugin for MongoDB<p>[1] https:&#x2F;&#x2F;github.com&#x2F;richardwilly98&#x2F;elasticsearch-river-mongodb<p>What tool do you use to reliably sync MongoDB collections with Elasticsearch?

2 comments

FBISurveillanceover 6 years ago
Take a look at Kafka. When your backend pushes data to MongoDB, have it produce a Kafka message that contains serialized Elasticsearch JSON documents and then use either a bespoke consumer, or kafka-connect-elasticsearch, or logstash-input-kafka to consume those documents and bulk-insert them into Elasticsearch.<p>Bonus points: it will let you have a standby Elasticsearch cluster in another region you could failover to when needed, perform Elasticsearch cluster upgrades&#x2F;maintenance without losing data, and more.<p>Depending on your use case this could be an overkill so YMMV.
评论 #18072784 未加载
picturover 6 years ago
<a href="https:&#x2F;&#x2F;github.com&#x2F;indatawetrust&#x2F;mongo-to-elastic" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;indatawetrust&#x2F;mongo-to-elastic</a>