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

GeoSpatial: index '2d' failure

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.3.3
    • 1.3.3
    • Index Maintenance
    • None
    • OSX

    Description

      When indexing an array field for lat/long:

      { location : [70, -70] }

      for a collection, it will error out if not all objects in the collection have the location array populated. So, if you have 10 objects and 1 does not have a lat/long, it will error out.

      Here is the console output:

      > db.hotels.ensureIndex(

      {location : '2d'}

      )
      geo field[location] has to be an Object or Array

      It seems like this should not error out, but rather skip over the ones that are not populated.

      Attachments

        Activity

          People

            eliot Eliot Horowitz (Inactive)
            revans Robert Evans
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: