Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-68920

Haystack geoSearch accepts NaN for 'limit' and 'maxDistance'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Won't Fix
    • 4.4.16, 4.2.22
    • None
    • None
    • None
    • Query Optimization
    • ALL

    Description

      The geoSearch command (GeoHaystackSearchCommand) uses the unsafe numberInt() method for the 'limit' and 'maxDistance' arguments. This means passing NaN will have different behavior on different platforms.

      limit NaN:

      • x86: effectively no limit.
      • arm: empty results.

      maxDistance NaN:

      • x86: empty results.
      • arm: point query.

      Ideally the parser should reject this argument since it doesn't make sense.

      Attachments

        Issue Links

          Activity

            People

              backlog-query-optimization Backlog - Query Optimization
              david.percy@mongodb.com David Percy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: