[SERVER-34247] Regular expression querying doesn't work for numbers Created: 02/Apr/18 Updated: 27/Oct/23 Resolved: 10/Apr/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Nrusingh Jena | Assignee: | Kelsey Schubert |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Description |
|
Using the regular expression search syntax on an number/integer field does not return expected results. Is there any solution for this issue? |
| Comments |
| Comment by Kelsey Schubert [ 10/Apr/18 ] |
|
Hi nrusingh.jena@halliburton.com, Thanks for your report. Please note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-users group. As Stennie explained elsewhere, "This is expected: regular expressions match patterns in strings, so you have to convert your numeric (or any other non-string values) into a string for comparison." Kind regards, |