geoIntersects not working properly when search Polygon is slightly larger

For a small bounding box over Chicago, I get the 4 hits I expect. But if I just slightly increase the size of the polygon query by shifting its west edge to the west, I stop getting the hits I expect.

Below are the bbox coordinates converted to a Polygon for the geoInstersects query:

``````// Finds 4 documents as expected
int llx = -100, lly = 40, urx = -70, ury = 45;

{"type": "Polygon", "coordinates": [[[-100.0, 40.0], [-70.0, 40.0], [-70.0, 45.0], [-100.0, 45.0], [-100.0, 40.0]]]}

// Shift the west edge of the bbox 2 degrees west
// Finds 1 document (the one it finds is quite a bit larger than the 3 it misses)
int llx = -112, lly = 40, urx = -70, ury = 45;

{"type": "Polygon", "coordinates": [[[-112.0, 40.0], [-70.0, 40.0], [-70.0, 45.0], [-112.0, 45.0], [-112.0, 40.0]]]}

// Shift the west edge of the bbox 2 degrees west again
// Finds 0 documents
int llx = -114, lly = 40, urx = -70, ury = 45;

{"type": "Polygon", "coordinates": [[[-114.0, 40.0], [-70.0, 40.0], [-70.0, 45.0], [-114.0, 45.0], [-114.0, 40.0]]]}
``````

In all 3 cases the 4 documents I expect are clearly within the search polygon. The geometries of the document data and of the polygon query are all counter-clockwise.

Does anyone have any idea what might be going on here?

Does the second case, where it finds one document with a larger footprint but misses the smaller three shed any light?

Any insight would be much appreciated. Thanks.

Sorry there is a typo in one of the comments in the OP and I can’t edit it. The first shift of the west edge to the west is by 12 degrees, not 2 degrees.