Still can't get this to work.
Yes it was a copy of what you wrote that is what I am trying. I am using the latest 10gen driver and will try and give as much background as I can.
var query = All();
query = query.Where(x => LinqToMongo.Inject(Query.Near("clocation", -0.737054, 51.636162, 1500)));
return query.ToList();
All is defined as
public IQueryable<T> All()
{
return this.collection.AsQueryable<T>();
}
Which seems to be working on all queries so far apart from this distance one.
the name "clocation" is the name of the field in the document which looks like:-
clocation:[-xxxx,xxxxx] x-representing long/lat as per your suggested order.
I have taken a look at the profile table and it seems like the query does not even reach the database.
Do i need to run a command in the shell on this field or something.
Again thanks for the assitance.
Regards
Regards
On Thursday, April 26, 2012 5:33:49 PM UTC+1, Ali wrote: