Open SimonLeiner opened 5 months ago
I have the same problem.
When leaving fields
empty, it syncs successfully.
When specifying fields it seems they are null, leaving the melisearch index empty.
fields:
_id: _id
product_name: product_name
or
fields:
_id:
product_name:
2024-07-02 11:26:24.756 | DEBUG | meilisync.plugin:pre_event:12 - pre_event: progress=None type=<EventType.create: 'create'> table=None data={'_id': 'None', 'product_name': None}, is_global: False
OS: macos 14.5 Python: 3.12.4 Mongodb: 7.0.12 (via brew) Meilisearch: 1.8.3 (self-hosted)
As a quick workaround: In file https://github.com/long2ice/meilisync/blob/dev/meilisync/source/mongo.py#L26
Replace the variable fields
with your preferred fields {"field_name":1}
e.g.:
cursor = collection.find({}, { "product_name": 1, "code": 1,"brands": 1, "product_quantity": 1, "product_quantity_unit": 1, "nutriscore_grade": 1, "product_name_de": 1, "nova_group": 1, "categories": 1 })
That did work for me.
Describe the bug I successfully Connected meilisync with my MongoDB Atlas Database. If I don't use the "fields" argument in the yaml file, I receive the data, however as soon as I specify the fields, all data is None.
My config.yml:
Example of some dummy Data in Mongo DB:
Logging without Specification:
Logging with Specification:
Expected behavior: Should Catch the Data given the provided fields
Desktop (please complete the following information):