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

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 3.0.12
    • 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}}]}) >

    Description

      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}}]})
      >

      Attachments

        Activity

          People

            Unassigned Unassigned
            abhishek.alney Abhishek Alney
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: