Using MongoDB IDs as ES document IDs

Hi All,

I recently have been working on a Mongoose plugin to index MongoDB
documents in Elasticsearch and wanted to use the same IDs across both but
ran into some errors. I'll be able to investigate further when I get home
as I don't recall the exact error but I am wondering if anyone has
experienced this?

For now I just store the MongoDB id as _mongoId in the elastic search
document.

Thanks,
James

You should be able to simply store the mongo id it as a string...

On Tue, Jun 19, 2012 at 6:53 PM, James Carr james.r.carr@gmail.com wrote:

Hi All,

I recently have been working on a Mongoose plugin to index MongoDB
documents in Elasticsearch and wanted to use the same IDs across both but
ran into some errors. I'll be able to investigate further when I get home
as I don't recall the exact error but I am wondering if anyone has
experienced this?

For now I just store the MongoDB id as _mongoId in the Elasticsearch
document.

Thanks,
James

doing the very same thing and haven't bumped into any problems.
can you be more specific about what sort of problems are you running into?

On Tuesday, June 19, 2012 9:53:00 AM UTC-7, James Carr wrote:

Hi All,

I recently have been working on a Mongoose plugin to index MongoDB
documents in Elasticsearch and wanted to use the same IDs across both but
ran into some errors. I'll be able to investigate further when I get home
as I don't recall the exact error but I am wondering if anyone has
experienced this?

For now I just store the MongoDB id as _mongoId in the Elasticsearch
document.

Thanks,
James

To quote what has probably been said may times on the internet, "I was
doing it wrong." :slight_smile:

Thanks,
James

On Thu, Jun 21, 2012 at 11:11 PM, benny.sadeh benny.sadeh@gmail.com wrote:

doing the very same thing and haven't bumped into any problems.
can you be more specific about what sort of problems are you running into?

On Tuesday, June 19, 2012 9:53:00 AM UTC-7, James Carr wrote:

Hi All,

I recently have been working on a Mongoose plugin to index MongoDB
documents in Elasticsearch and wanted to use the same IDs across both but
ran into some errors. I'll be able to investigate further when I get home
as I don't recall the exact error but I am wondering if anyone has
experienced this?

For now I just store the MongoDB id as _mongoId in the Elasticsearch
document.

Thanks,
James