Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Database
Created by Guest
Created on Dec 9, 2021

multiple centersphere as a geometry for geowithin

im looking at one of my queries that a system regularly runs and some times we look for records that are within up to 250 different centerspheres, i wornder if we could enable, like geowithin has the ability to support multiple poligons, we could enable multiple centerspheres , ``` $match: {{'location':{ "$geoWithin" : { "$centerSphere" : [[ 14.4321, -9.4321], 2.5232135647961246e-05] } }}, {'location':{ "$geoWithin" : { "$centerSphere" : [[ 14.4321, -9.4321], 2.5232135647961246e-05] } }}, ...} ``` we could do : ``` $match: {'location':{ "$geoWithin" : { "$centerSpheres" : [ [[ 14.4321, -9.4321], 2.5232135647961246e-05] , [[ 14.4321, -9.4321], 2.5232135647961246e-05], ... ] } }}
  • Attach files