Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does ElasticSearch store a duplicate copy of each record?

I started looking into ElasticSearch, and most examples of creating and reading involve POSTing data to the ElasticSearch server and then doing a GET to retrieve them.

Is this data that is POSTed stored separately by the ElasticSearch server? So, if I want to use ElasticSearch with MongoDB, does the raw data, not including the search indices, get stored twice (once copy for MongoDB and one for ElasticSearch)?

In conjunction with an answer to this question, a description or a link to a description of how ElasticSearch and the primary data store interact would be very helpful.

like image 645
morsecoder Avatar asked Nov 03 '25 07:11

morsecoder


1 Answers

Yes, ElasticSearch can only search within its own data store, so a separate copy will be there.

You can use the mongodb connector to keep the data in elastic in sync with the mongo database: https://github.com/mongodb-labs/mongo-connector

like image 115
Anders Bornholm Avatar answered Nov 06 '25 03:11

Anders Bornholm