0

I tried to do Geo Index for a job post platform. I have a job post object which could have multiple locations[lat,lon]. I've read and tried everything on the official documents but I can only do GeoIndex with one location. https://www.arangodb.com/docs/stable/indexing-geo.html#multipoint https://www.arangodb.com/docs/stable/aql/functions-geo.html#geo_distance

I want to do Geo index on locations[lat,lon] field with multiple lat and lon values.

Please help

Sun Chanras
  • 49
  • 2
  • 7
  • If LFNL's anwser did solve your problem, please accept it - that helps others facing the same issue; if not, try to ask better questions by e.g. providing concrete code/data examples, not just verbal descriptions. – Tom Regner Dec 08 '22 at 08:47

1 Answers1

1

If you have a list of locations you can set up an array-index.

collection.ensureIndex({ type: "geo", fields: [ "locations[*]" ], geoJson:true })

LFNL
  • 21
  • 1