$Min and $Max Update Operators lecture / documentation discrepancy

In the lecture, $min “Only updates the field if the specified value is greater than the existing field value”
image
, while documentation at https://docs.mongodb.com/manual/reference/operator/update/ says: “Only updates the field if the specified value is less than the existing field value”
image

@Neil_01783
Yep there is a discrepancy between the video and the actual docs.
However I believe the docs are correct when they say that the update operator, $min , will only update the value in the document if the new value is less than current.
Good eye :+1:

Hi @Neil_01783,

Thanks for notifying this issue!!

There would have been an update in the docs. However, the content of the video is the same and as a result there is older version in the video.

Please follow the definition as mentioned in the doc. I will also update this in the lecture notes.

Thanks again!!

Sonali

1 Like