Reputation: 49
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
Upvotes: 0
Views: 62
Reputation: 21
If you have a list of locations you can set up an array-index.
collection.ensureIndex({ type: "geo", fields: [ "locations[*]" ], geoJson:true })
Upvotes: 1