$uniqueDocs validation does not error with "uniquedocs" or "$uniquedocs" tag names.

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.5.4
    • Affects Version/s: 2.4.5
    • Component/s: Querying
    • Environment:
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Problem:
      The validation for the $geoWithin allows enormous values to be passed into the query without throwing an error.

      Reproduce:

      2.4.5

      db.q.drop()
      db.q.find( { "loc" : { $geoWithin : { $polygon : [ [ 0.0 , 89.9 ] , [ -25 , 33.3 ] , [ 180.0 , -33.3 ] ] , uniquedocs : false } } }  )
      db.q.find( { "loc" : { $geoWithin : { $polygon : [ [ 0.0 , 89.9 ] , [ -25 , 33.3 ] , [ 180.0 , -33.3 ] ] , $uniquedocs : false } } }  )
      db.q.find( { "loc" : { $geoWithin : { $polygon : [ [ 0.0 , 89.9 ] , [ -25 , 33.3 ] , [ 180.0 , -33.3 ] ] , $uniqueDocs : false } } }  )
      

      No error pr documents are returned.

      2.5.4-Pre

      db.q.drop()
      db.q.find( { "loc" : { $geoWithin : { $polygon : [ [ 0.0 , 89.9 ] , [ -25 , 33.3 ] , [ 180.0 , -33.3 ] ] , uniquedocs : false } } }  )
      error: { "$err" : "bad query: BadValue bad geo query", "code" : 16810 }
      
      db.q.find( { "loc" : { $geoWithin : { $polygon : [ [ 0.0 , 89.9 ] , [ -25 , 33.3 ] , [ 180.0 , -33.3 ] ] , $uniquedocs : false } } }  )
      error: { "$err" : "bad query: BadValue bad geo query", "code" : 16810 }
      
      db.q.find( { "loc" : { $geoWithin : { $polygon : [ [ 0.0 , 89.9 ] , [ -25 , 33.3 ] , [ 180.0 , -33.3 ] ] , $uniqueDocs : false } } }  )
      

              Assignee:
              Unassigned
              Reporter:
              Alvin Richards (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: