[SERVER-205] $or Created: 30/Jul/09 Updated: 12/Jul/16 Resolved: 09/Jun/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 1.5.3 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Eliot Horowitz (Inactive) | Assignee: | Aaron Staple |
| Resolution: | Done | Votes: | 44 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Participants: | |||||||||||||
| Description |
|
maybe: { $or : [ { x : 5 }, { a : 3 }] } |
| Comments |
| Comment by auto [ 13/Apr/10 ] |
|
Author: {'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}Message: |
| Comment by Eliot Horowitz (Inactive) [ 13/Apr/10 ] |
|
ah, i see |
| Comment by Aaron Staple [ 13/Apr/10 ] |
|
so if somebody does an update and they want to use the $ operator to represent the modified field - which of the $or clauses should we use to get the array match from? What if there's an array match in a non or portion of the query? |
| Comment by Eliot Horowitz (Inactive) [ 13/Apr/10 ] |
|
did you mean to have something after the $ or am i missing something |
| Comment by Aaron Staple [ 13/Apr/10 ] |
|
what's desired behavior for the $ operator? |
| Comment by Eliot Horowitz (Inactive) [ 13/Apr/10 ] |
|
Recursive shouldn't be allowed |
| Comment by Aaron Staple [ 13/Apr/10 ] |
|
so allowing non or fields adjacent to or fields invites the possibility of recursive ors. Do we want to allow recursive ors? |
| Comment by Eliot Horowitz (Inactive) [ 12/Apr/10 ] |
|
you can $not an $or ideally { a:1,$or:[ {b:2}, {c:3}]} is supported though , { a : 2 , b : 3 } ] maybe start with that actually |
| Comment by Aaron Staple [ 12/Apr/10 ] |
|
Also, can you $not an $or? |
| Comment by Aaron Staple [ 12/Apr/10 ] |
|
is a query like this allowed { a:1,$or:[ {b:2}, {c:3}]} or will the $or always be the only top level field? |
| Comment by Dwight Merriman [ 26/Mar/10 ] |
|
see also http://www.mongodb.org/display/DOCS/OR+operations+in+query+expressions |
| Comment by Randy Pond [ 26/Aug/09 ] |
|
Some discussion on the forum about $or: |