[DOCS-2181] Mixed type comparison rules Created: 01/Nov/13 Updated: 19/Aug/14 Resolved: 19/Aug/14 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | None |
| Fix Version/s: | v1.3.10 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andre Spiegel | Assignee: | Kay Kim (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: | |
| Days since reply: | 9 years, 26 weeks, 1 day ago |
| Description |
|
I couldn't find any documentation on how mixed types compare in mongo queries. For example, if a document has { a: 1 }, does the query { a: NumberLong(1) }find it? I figured out by experiment that the type does not seem to matter, but would like some page to state the precise rules. E.g. what about $gt, $ne, etc.? Does a boolean/numeric comparison ever return true? How about string/numeric? Most of this is pretty straightforward and intuitive, but it needs to be specified somewhere. |
| Comments |
| Comment by Githook User [ 19/Aug/14 ] |
|
Author: {u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}Message: |