[SERVER-16480] Query with $gt with Alphabate includes the results with Criteria Created: 09/Dec/14 Updated: 09/Dec/14 Resolved: 09/Dec/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Amit Kshirsagar | Assignee: | Ramon Fernandez Marina |
| Resolution: | Done | Votes: | 0 |
| Labels: | query | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
NA |
||
| Operating System: | ALL |
| Participants: |
| Description |
|
See below query,
Because I am filtering the Collection based on Names greater than "A", where I should expect result shown as only below,
It displays all Three documents even with the name starting as "A". If this is correct functionality, then what $gte:"A" should print out the documents? Please let me know if you need any further details. Thanks, |
| Comments |
| Comment by Amit Kshirsagar [ 09/Dec/14 ] | |||||||||||||||||
|
Thanks Ramon for the clarification. | |||||||||||||||||
| Comment by Ramon Fernandez Marina [ 09/Dec/14 ] | |||||||||||||||||
|
amit.kshirsagar.13@gmail.com, this is the expected behavior. The comparison is done in lexicographical order, so "Amit" > "A". If you want to see results where name starts with letters B-Z, you can use:
Here's a longer example that should help illustrate this behavior:
Regards, |