excludeFields property does not work for update operations.
ozanozen opened this issue · 1 comments
This is my first time posting a bug to an open source project, I hope everything goes well.
I used this river for an existing db with exclusion filters and I observed that excluded fields did exist in the indexed documents. When I dug into the code I saw that for update operations the document is queried after exclusion step which rendered exclusion filter useless. I fixed the issue by moving the exclusion filter closer to adding the data to stream for operations other than update. For update I added a BasiDBObject to query which filters out excluded fields on db level.
I tested this fix intensively in our database (I didn't write new test cases due to time constraints I have in my project, sorry) and it works for multi level fields as well.
I will link the pull request
PR #104 has been manually merged.