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

Querying for timestamp against date field generates error

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.6.5
    • Component/s: Shell
    • None
    • ALL
    • Hide

      1. Create collection with date type entries.
      2. Run the following from the mongo client.
      db.interactions.count({"timestamp":{$type:17}})

      Show
      1. Create collection with date type entries. 2. Run the following from the mongo client. db.interactions.count({"timestamp":{$type:17}})

      > db.collection.count();
      474123
      > db.collection.count({"timestamp":{$type:9}});
      474123
      > db.collection.count({"timestamp":{$type:17}});
      2015-02-18T13:58:02.394-0500 count failed: {
      "code" : 13111,
      "ok" : 0,
      "errmsg" : "13111 wrong type for field () 17 != 9"
      } at src/mongo/shell/query.js:191

            Assignee:
            ramon.fernandez@mongodb.com Ramon Fernandez Marina
            Reporter:
            cwendling Corey Wendling
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: