-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.4.19, 6.0.5
-
Component/s: Aggregation Framework
-
None
-
Query Execution
-
ALL
-
We've recently been writing a query to get back the index of an array item, however, it took us a while to realize that the index being returned was incorrect.
It seems that if the expression that you give to `$indexOfArray` has none existent values then the array index will be off by 1.
I'm not sure if this is by design but there's nothing in the documentation around this behavior.