
Untitled
By: a guest on
Jul 17th, 2012 | syntax:
None | size: 0.59 KB | hits: 18 | expires: Never
Is there any way to skip some documents in GeoNear() MongoDB method?
type is specified:
{
id: ObjectId,
location : {double, double}, /*array, that contains
just longitude and latitude*/
someUsefulData : string
}
// set GetNear() options
var options = new GeoNearOptionsBuilder()
.SetMaxDistance(50) // meens 50 miles
.SetSpherical(true);
// create conditions query
var conditions = Query.NE("someUsefulData ", $ne : {null});
// execute GetNear()
var geoNearResult = collection
.GeoNear(conditions, longitude, latitude, limit, options);