mongo aggregate if null or zero return 1
onWhen we have situation $divide some number field value can be a zero or null, then aggregate will fail with error, so we may need to default value in some case, so hope this article and example will help PlanExecutor error during aggregation :: caused by :: can’t $divide by zero Here’s an example of […]
Read more..