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 |
|---|---|
org.bson.Document |
toDocument(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 org.bson.Document toDocument(AggregationOperationContext context)
AggregationOperationtoDocument in interface AggregationOperationCopyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.