| Modifier and Type | Class and Description |
|---|---|
static class |
GeoNear.GeoNearBuilder
Provides a builder for GeoNear instances.
|
| Modifier and Type | Method and Description |
|---|---|
static GeoNear.GeoNearBuilder |
builder(String distanceField)
Creates a builder for a GeoNear pipeline stage
|
String |
getDistanceField() |
Double |
getDistanceMultiplier() |
String |
getIncludeLocations()
This specifies the output field that identifies the location used to calculate the distance.
|
Long |
getLimit() |
Double |
getMaxDistance()
The maximum distance from the center point that the documents can be.
|
Long |
getMaxDocuments()
The num option provides the same function as the limit option.
|
double[] |
getNear()
The point for which to find the closest documents.
|
Query |
getQuery()
Limits the results to the documents that match the query.
|
Boolean |
getSpherical()
Required if using a 2dsphere index.
|
Boolean |
getUniqueDocuments()
Deprecated.
since version MongoDB 2.6: Geospatial queries no longer return duplicate results. The $uniqueDocs operator has no impact
on results.
|
public static GeoNear.GeoNearBuilder builder(String distanceField)
distanceField - the field to processpublic String getDistanceField()
public Double getDistanceMultiplier()
public String getIncludeLocations()
public Long getLimit()
public Double getMaxDistance()
public Long getMaxDocuments()
public double[] getNear()
public Query getQuery()
public Boolean getSpherical()
@Deprecated public Boolean getUniqueDocuments()