thinky

How do I run a filter on a getNearest() query in RethinkDB?

孤街浪徒 提交于 2019-12-11 18:05:32
问题 I have a table with users and their locations saved as r.point datatypes & a geo index set on them. I am trying to run a .getNearest() query, which returns all the users closest to the given user (say, Mr. X ). The results return all the users closest to Mr. X , but also include Mr. X . How do I filter all users except Mr. X ? What I've tried so far — In RethinkDB's Data Explorer (Plain ReQL commands) r.db('myDb').table('myTable').getNearest(r.point(-20, 39), {index: 'location'}).filter