We have encountered an issue while executing geospatial queries on MongoDB version 6.3.2. The error message "Union requires two index intervals" is being thrown, and this seems to be specific to instances running MongoDB 6.3.2 with a 2D sphere index created. It's important to note that this error does not occur when the query performs a COLLSCAN operation.
Furthermore, we have identified that the issue arises when the query involves a compound operation of geospatial and other equality operations. However, if we remove the non-geospatial condition from the query, it executes successfully without any errors.
The problem is observed on both Atlas serverless and dedicated instances running MongoDB version 6.3.2. Notably, we have verified that this error is not present in MongoDB versions 6.0.8 and 5.0.19.
- backported by
-
SERVER-63349 Modify QueryPlanner and IndexBoundsBuilder to produce an IET
- Closed