Hi everyone,
I’m using MongoDB Change Streams to monitor updates to documents in my collection. I noticed that even when the value of a field doesn’t change, but the position of the field in the document changes (possibly due to a replaceOne() operation), a change event is still triggered.
- Is this expected behavior?
- Does MongoDB treat field reordering as a meaningful change in the BSON serialization?
- Is there a recommended way to avoid triggering Change Stream events when only the field order changes but values remain the same?
Any insights or best practices would be appreciated!
Thanks in advance.