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

Have $or queries with two $in queries to return unique results

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.7.0, 1.7.1
    • Component/s: None
    • Labels:
      None

      It seems $or queries should have the option to return unique results instead of (as far as I can tell) amalgamating the results of the individual $or statements.

      For example if you have

      1:

      color: Color value is invalid

      2:

      color: Color value is invalid

      $or: [ {color: {$in:['blue','red']} }, {shape: {$in:[circle,square]} } ]

      Right now it seems to returns 4 results in the cursor. Both documents are returned twice.

            Assignee:
            aaron Aaron Staple
            Reporter:
            chrischen21 Chris
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: