[SERVER-6169] "invalid property id" when using $or in mapreduce Created: 22/Jun/12 Updated: 11/Jul/16 Resolved: 22/Jun/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | MapReduce, Querying |
| Affects Version/s: | 2.0.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kerim Satirli | Assignee: | Aaron Staple |
| Resolution: | Done | Votes: | 0 |
| Labels: | mapreduce | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
EC2; Amazon AMI; mongo is running in a sharded replicaset |
||
| Operating System: | Linux |
| Participants: |
| Description |
|
Using the m/r function with an $or query appears to be impossible right now. We are using the query below for one of our map reduces and are getting this error:
mongo mentions line 78; below are lines 73-84:
Running the query through a find generates the results we expect; removing the $or condition, too, generates results we expect. It seems as if combining $or with another field however, is not possible at this point. |
| Comments |
| Comment by Kerim Satirli [ 22/Jun/12 ] | |||
|
Thanks for the pointer! This works. | |||
| Comment by Aaron Staple [ 22/Jun/12 ] | |||
|
It looks like your query line is:
This is not valid javascript because there is no field name in the object named "query" for the value { "_id.DAY": "2012-06-22" , $or : [ {"_id.CLIENT_ID": 123}, {"_id.CLIENT_ID": 456}] }. |