Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-9066

Comment on: "manual/reference/operator/query/minDistance.txt"

    XMLWordPrintableJSON

Details

    Description

      If we use both minDistance and maxDistance,it is not working correctly.It was giving the same result as it was showing in only maxDistance

      query.location = {
      $nearSphere: {
      $geometry:

      { type: 'Point', coordinates: [bookingData.bookingAddress.location.coordinates[0], bookingData.bookingAddress.location.coordinates[1]] }

      ,
      $minDistance: (22 * 1000),
      $maxDistance :(40 * 1000)
      }
      };

      query.location = {
      $nearSphere: {
      $geometry:

      { type: 'Point', coordinates: [bookingData.bookingAddress.location.coordinates[0], bookingData.bookingAddress.location.coordinates[1]] }

      ,
      $maxDistance :(20 * 1000)
      }
      };

      Attachments

        Activity

          People

            Unassigned Unassigned
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              1 year, 14 weeks, 2 days ago