简体   繁体   中英

How to do ArangoDB geo index for multiple location[lat,lon]

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM