Class NearSphereOperation


public class NearSphereOperation extends AbstractProximityOperation
Represent $nearSphere operation. Specifies a point for which a geospatial query returns the documents from nearest to farthest.
  • Constructor Details

    • NearSphereOperation

      public NearSphereOperation(String fieldName, double longitude, double latitude, Double maxDistance, Double minDistance)
      Constructor for NearSphereOperation. maxDistance and minDistance are optional, so they can be null.
      Parameters:
      fieldName - the name of the field for the proximity operation
      longitude - the longitude of the point for the proximity operation
      latitude - the latitude of the point for the proximity operation
      maxDistance - the maximum distance for the proximity operation (null means no maximum distance constraint)
      minDistance - the minimum distance for the proximity operation (null means no minimum distance constraint)