Aerospike.connect().then(async (client) => { // find any records that have a recent location within 1000m radius of the specified coordinates letgeoFilter = Aerospike.filter.geoWithinRadius('recent', 103.8, 1.305, 1000, Aerospike.indexType.LIST, newContext().addListIndex(0)) letquery = client.query('test', 'demo') query.where(geoFilter)
letresults = awaitquery.results() for (letrecordinresults) { console.log(record.bins.recent) } client.close() })
This namespace provides functions to create secondary index (SI) filter predicates for use in query commands via the Client#query command.
See
Query
Example