Raw query near

17 views
Skip to first unread message

Nicola Contu

unread,
Dec 28, 2015, 10:45:13 AM12/28/15
to rogue-users
Hello,
I'm using Liftweb 3.0M6 and rogue 2.5.1

I would like to get users using the near function given specific lat and lot values.

The near def in rogue also wants a Distance in degrees.
My problem is that I would like to get nearest users that I can get via mongo with this query : db.user.users.find({latlng: { $near: {long: -74, lat: 40}}})

I am thinking if using .raw I can get the same result.

User.raw(_.add("latlon $near", "lat:"+cityLat + ",long"+cityLon)).and(_.active eqs true).fetch

Tried with this, but actually, this is not working.

Any help?

Thanks a lot,
Nicola

Reply all
Reply to author
Forward
0 new messages