Spatial filter with longitude out of range [-180;180] considered as invalid
If a rectangle spatial filter larger than 180 on longitude, and the rectangle across the international date change line, the following behavior is observed:
Longitude of right side of the rectangle will be converted from "-165" to "195"and search API gives 400 error, because it constraints the longitude to be within [-180,180]
{"field":"data.SpatialLocation.Wgs84Coordinates","byGeoPolygon":{"points":[{"longitude":5.648519075025133,"latitude":47.33389841046996},{"longitude":5.648519075025133,"latitude":-80.31395034614398},{"longitude":194.6133628249749,"latitude":-80.31395034614398},{"longitude":194.6133628249749,"latitude":47.33389841046996},{"longitude":5.648519075025133,"latitude":47.33389841046996}]}}}
I would suggest to relax the validation to range [-360, 360]. Because the it is difficult to guarantee the efficiency of the changes for all Elastics in all CSPs, it is recommended to use some feature flag. Each CSP could switch on and test this validation on one's own.