esarkissian-rythmos commented on issue #3471: NIFI-6293 Fix for MongoDB Aggregation does not parse dates URL: https://github.com/apache/nifi/pull/3471#issuecomment-492016221 Any "$match" statement that requires date checking, for example: ```json [ { "$match": { "someDateField": { "$gt": "2019-01-01T00:00:00.000Z" } } } ] ``` The problem is that internally this is sent as a string to Mongo, instead of a date object. So the comparison does not work. I am later finding out that this PR may not be the most straightforward way to do this. I think the other MongoDB processors allow the use of Extended JSON to do this, e.g. GetMongo: ``` { "someDateField": { "$gt": { "$date": "2019-01-01T00:00:00.000Z" } } } ``` I think if we use the BasicDBObject.parse() static method we can achieve the same functionality. This is much better than what I have done in this PR. In fact we should probably kill this PR.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
