toystars / node-elasticsearch-sync

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

Bug in selecting collection name #7

Closed nuest closed 8 years ago

nuest commented 8 years ago

I have an issue with collection name != type name, and I think it is down to this line

https://github.com/toystars/node-elasticsearch-sync/blob/master/index.js#L64

Should that not do something like currentCollectionName = document.collection ?

toystars commented 8 years ago

As it stands right now, the name of every Mongo collection to be synced in ES has to be the name used in ES as type name. This might be configurable in nearest future...

nuest commented 8 years ago

I understand.

The watcher configuration and examples show using two values, which could be interpreted as them being independent. I suggest to mention this limitation in the examples, or to throw an error when the values are different.

Thanks for the quick reply!