[SERVER-8051] Regex don't work with number Created: 31/Dec/12 Updated: 15/Feb/13 Resolved: 01/Jan/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Tiago Temporin | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | Linux |
| Participants: |
| Description |
|
The following command doesn't find anything if the type of numero_pedido it's a number, but if the type is a string the commando works normally. db.pedidos.find( {"numero_pedido":{"$regex":/135/}}, [] ).sort( [] ).limit( 20 ).skip( 0 ) |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 01/Jan/13 ] |
|
regexes are only meant to work with strings. |