Query with gte instead of $gte is not reporting a syntax error

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 3.0.12
    • Component/s: Querying
    • None
    • ALL
    • Hide

      use pcat db

      run the below query

      > db.pd.find({$and:[

      {name:"AC3 Case Red"}

      ,{price:{gte:12}}]})
      >

      Show
      use pcat db run the below query > db.pd.find({$and:[ {name:"AC3 Case Red"} ,{price:{gte:12}}]}) >
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      hi,

      I am using Mongo 3.0.12 on Linux 4.2.3-300.fc23.x86_64. While running the below query , mongo shell did not report a syntax error. Where in the $ sign is missing in the query.

      > db.pd.find({$and:[

      {name:"AC3 Case Red"}

      ,{price:{gte:12}}]})
      >

            Assignee:
            Unassigned
            Reporter:
            Abhishek Alney
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: