public class GeoNearOperation extends Object implements AggregationOperation
geoNear aggregation operation.
We recommend to use the static factory method Aggregation.geoNear(NearQuery, String) instead of creating
instances of this class directly.
| Constructor and Description |
|---|
GeoNearOperation(NearQuery nearQuery,
String distanceField)
Creates a new
GeoNearOperation from the given NearQuery and the given distance field. |
| Modifier and Type | Method and Description |
|---|---|
com.mongodb.DBObject |
toDBObject(AggregationOperationContext context)
|
public GeoNearOperation(NearQuery nearQuery, String distanceField)
GeoNearOperation from the given NearQuery and the given distance field. The
distanceField defines output field that contains the calculated distance.query - must not be null.distanceField - must not be null.public com.mongodb.DBObject toDBObject(AggregationOperationContext context)
AggregationOperationtoDBObject in interface AggregationOperationCopyright © 2011-2014–2015 Pivotal Software, Inc.. All rights reserved.