Skip to content

geoNear Error parse #23

@mite-404

Description

@mite-404

I'm trying to use geoNear aggregation like this:

filter={
  "$geoNear":{
    "near": {
      "type" : "Point",
      "coordinates" : [12.897594,12.897594]
     },
    "spherical" : false,
    "distanceField" : "calcDistance",
    "maxDistance" : 240,
    "distanceMultiplier" : 0.1
  }
}

but when parsed the filter loses the coordinates, this is the result:

{
  '$geoNear': {
    near: { type: 'Point', coordinates: [] },
    spherical: false,
    distanceField: 'calcDistance',
    maxDistance: 240,
    distanceMultiplier: 0.1
  }
}

how can i solve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions