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

mongodb 3.2:2d index return all document by default in "Proximity to a Point on a Flat Surface" ,not 100 as descripted in manual

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.0.3, 3.2.0
    • Component/s: Geo
    • None
    • ALL
    • Hide

      1. create mongodb 3.2 and 2.6 instance respectively
      2. using the dump file to restore the data.
      3. db.player.find({'match_lv':{'$near':[1,0]}}).count();
      4. in 3.2, it returns 1000 and in 2.6, it return 100(sorry for lack of 2.6 dumpfile)

      Show
      1. create mongodb 3.2 and 2.6 instance respectively 2. using the dump file to restore the data. 3. db.player.find({'match_lv':{'$near': [1,0] }}).count(); 4. in 3.2, it returns 1000 and in 2.6, it return 100(sorry for lack of 2.6 dumpfile)
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      I use 2-d index to match in player collection as follows

      db.player.find({'match_lv':{'$near':[1,0]}}).count();

      However, in mongodb 3.2, it return all documents not 100 document by default.
      Btw, in mongodb 2.6, it return 100 document indeed and in mongodb3.0, it return all documents

      I guess there is something wrong in mongdb 3.0 and mongodb 3.2 in 2-d index, because it conflict with manual

            Assignee:
            kelsey.schubert@mongodb.com Kelsey Schubert
            Reporter:
            jiawenjie jiawenjie
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: