I am using rethinkdb-java to query my geo dataset for all coordinates (latitude,longitude) within a radius R of a center datapoint. For this purpose I use the getNearest method, which works fine for less dense areas but fails otherwise. More specifically:
Connection conn = r.connection().hostname("localhost").port(28015).connect();
r.db("mydb").tableCreate("mytable").optArg("primary_key","myid").run(conn);
r.db("mydb").table("mytable").indexCreate("location").optArg("geo", true).run(conn);
r.db("mydb").table("mytable").getNearest(r.point(node.getLongitude(), node.getLatitude())).optArg("index", "location").optArg("max_dist", radius).optArg("max_results", 1000000).run(conn);
I was wondering if I am missing something or if it is even possible to perform this query without decreasing the max_results limit? If it is possible, how can I accomplish this?
I've seen other questions (e.g. here) reporting the same problem, however in very different scenarios, hence I doubt the solutions would be the same.
Thank you for your time