toystars / node-elasticsearch-sync

ElasticSearch and MongoDB sync module for node
MIT License
17 stars 11 forks source link

Don't overwrite existing ID parameters in default transformation #15

Closed nuest closed 7 years ago

nuest commented 8 years ago

The documents in my MongoDB schema have an id attribute, which is overwritten by the default transform(..) function. I see different options to make this more flexible (e.g. with an environment variable or by re-introducing settings), but the simplest solution seems to be to only make the "id shift" if the ID parameter does not exist, log a warning, and let the user handle the copying of the id in their transform function.

I am adding changes to that effect to #14

nuest commented 8 years ago

@toystars Are you planning to make a release soon?

toystars commented 8 years ago

@nuest Once there are substantial additions, I'll make a new release.