algolia / mongo-connector

WARNING : This connector is deprecated, please use an API Client
https://www.algolia.com/doc/
Apache License 2.0
22 stars 11 forks source link

Question : Multiple collections #18

Closed patrickml closed 8 years ago

patrickml commented 8 years ago

Im unsure about exactly what the docs are saying here

Note: If you synchronize multiple collections with multiple indexes, do not forget to specify a specific connector configuration file for each index using the -o config.txt option (a config.txt file is created by default).

Is there any way you can provide an example of the config file? Mine looks like this

["Collection(Database(MongoClient([u'localhost:27017', u'localhost:27015', u'localhost:27016']), u'local'), u'oplog.rs')", 6223144566631956481]

It doesnt say anything about the collections im using or the indexes

This is the command im using to run

mongo-connector -m mongodb://oplogger:password@localhost:27017,localhost:27016,localhost:27015/local?authSource=admin -n flex.branches -d algolia_doc_manager -t myapp:mykey:branches -o config.txt
Nagriar commented 8 years ago

The config file is a file created and used by the mongo connector to keep the status of the synchronisation so you need to specify one file per instance of the mongo-connector

The collection is specified in the command line with the parameter '-n' in your example, It's the branches collection in the flex db.

patrickml commented 8 years ago

So do I have to run multiple instances of Mongo connector or can I connect all my collections using a config file I guess that's what I'm confused about. On Tue, Dec 1, 2015 at 3:33 AM Xavier Grand notifications@github.com wrote:

The config file is a file created and used by the mongo connector to keep the status of the synchronisation so you need to specify one file per instance of the mongo-connector

The collection is specified in the command line with the parameter '-n' in your example, It's the branches collection in the flex db.

— Reply to this email directly or view it on GitHub https://github.com/algolia/mongo-connector/issues/18#issuecomment-160893567 .

Nagriar commented 8 years ago

You have to run one instance per collection.