[SERVER-29416] all for $regex to be performant with end-string anchor Created: 01/Jun/17 Updated: 02/Jun/17 Resolved: 02/Jun/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Amit Gupta | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
Currently we have millions of documents stored in a collection that use an email field with index. We would like to efficiently search through the collection for either a specific email address, or a domain name. The docs indicate that a query should start with a carrot for the regex to be used efficiently. We would love to be able to do the 2 following searches: /jdoe@example.com$/ Both could easily use the same index if they could be optimized. |
| Comments |
| Comment by Kelsey Schubert [ 02/Jun/17 ] |
|
Thanks for your report. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. I'd recommend asking a question about this use case on on the mongodb-users group, where other users can discuss their solutions. Kind regards, |