Querying for timestamp against date field generates error

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: 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}})
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      > 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 Marina
            Reporter:
            Corey Wendling
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: