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

Query with $in and $lt

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Macintosh

    Description

      Hi,

      I am trying to execute the below query, it does not find result.

      db.users.find({ "_id" : "abc", "SYS_PERM" : { "$in" : [{ "_ANY_" : { "$lt" : 3 } }, { "_ALL_" : { "$lt" : 3 } }] } })
      

      It looks $lt operator doesn't work inside of $in operator. The same work if I remove the $lt as follows.

      db.users.find({ "_id" : "abc", "SYS_PERM" : { "$in" : [{ "_ANY_" : 1 }, { "_ALL_" : 1 }] } })
      

      Is this the current known limitation in MongoDB?

      Attachments

        Activity

          People

            mark.agarunov Mark Agarunov
            sarankup Saravanan Kuppusamy
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: