[CDRIVER-97] Advanced query fails Created: 15/Sep/11 Updated: 03/May/17 Resolved: 15/Sep/11 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Horen | Assignee: | Kyle Banker |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Mac OS 10.7 |
||
| Description |
|
Advanced query like find( { dst : "ABCD" , obsTime : { $gt : 1310612524, $lt : 1310613524}}).sort( {obsTime :1 }) fails $gt and $lt works fine, adding $query returns the entire data set, adding sort returns 0 documents. |
| Comments |
| Comment by Kyle Banker [ 15/Sep/11 ] |
|
Awesome. Glad it worked! |
| Comment by Horen [ 15/Sep/11 ] |
|
Kyle, Thank you very much. -Horen |
| Comment by Horen [ 15/Sep/11 ] |
|
Kyle, Thank you very much. |
| Comment by Kyle Banker [ 15/Sep/11 ] |
|
You need to wrap the entire query in $query and the entire sort clause in $orderby. Please try this: bson_init(&b); |
| Comment by Horen [ 15/Sep/11 ] |
|
bson_init(&b); works fine. bson_init(&b); returns the entire data set. |
| Comment by Kyle Banker [ 15/Sep/11 ] |
|
Can provide a failing test case with code, please? |