我已经使用javascript看到了...
r.db('myDb').table('myTable').getNearest(r.point(-20, 39), {index: 'location'})
.filter(function(user) {
return user('doc')('id').ne('2ff8902e-97f0-431a-a51c-900a57532967')
})
我想通过最新的(2.3.3)Java RethinkDB驱动程序使用它...
result = r.table('myTable').
getNearest(r.point(-00.000,-00.000)).
optArg("max_results", MAX_RESULTS).
optArg("max_dist", MAX_DISTANCE).
// location is a secondary index
optArg("index", "location").
// This next line is psuedo and doesn't work
// Anyone have suggestion(s) how to get this next line to work?
// filter(row -> row.g("doc")("id").ne("2ff8902e-97f0-431a-a51c-900a57532967")).
run(conn);
要明确的是,问题在于如何使以下行正常工作,因为它行不通。
filter(row -> **row.g("doc")("id")**.ne("2ff8902e-97f0-431a-a51c-900a57532967"))