我在 PHP 中,我有一个可能有位置或没有位置的文档,我在上面使用 geonear。我想保留空值的位置。我能怎么做 ?
[
'$geoNear' => [
'near' => [
'type' => 'Point',
'coordinates' => [$logitude, $latitude],
],
'query' => [
'matchingUUID' => $uuid,
],
'distanceField' => 'destination.calculatedDistance',
'spherical' => true,
],
]
非常感谢