[SERVER-6250] Operator $or doesn't work Created: 29/Jun/12 Updated: 15/Aug/12 Resolved: 02/Jul/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 2.0.6 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Roman Schurov | Assignee: | Daniel Crosta |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
fedora 16 KDE |
||
| Operating System: | Linux |
| Participants: |
| Description |
|
> db.artists.find({img : {$exists : false}}).count() |
| Comments |
| Comment by Roman Schurov [ 02/Jul/12 ] | ||||||||
|
Thanks, Dan. | ||||||||
| Comment by Daniel Crosta [ 02/Jul/12 ] | ||||||||
|
Ah, that explains it. $or was added in version 1.6, so if you need to use it, you will have to upgrade your server. | ||||||||
| Comment by Roman Schurov [ 02/Jul/12 ] | ||||||||
|
db.serverStatus() > db.artists.find() | ||||||||
| Comment by Daniel Crosta [ 02/Jul/12 ] | ||||||||
|
Thanks. I'm not certain why the buildInfo command didn't work – can you check the version of the server you're using? You can find this out with the db.serverStatus() shell helper. I am still unable to reproduce this – have you been able to create a small reproducable test case? Here's what I've tried:
If you'd like to share your actual data confidentially, let me know and I can provide information on how to do so. | ||||||||
| Comment by Roman Schurov [ 02/Jul/12 ] | ||||||||
|
Hi Dan. > db.artists.getIndexes() }, , > db.artists.stats() , > db.runCommand( {buildInfo: 1}) , "ok" : 0 } | ||||||||
| Comment by Daniel Crosta [ 29/Jun/12 ] | ||||||||
|
Hi Roman, I can't reproduce this case, at least not yet. Can you show the output of db.artists.getIndexes(), db.artists.stats(), and db.runCommand( {buildInfo: 1})? |