[SERVER-29805] Case insensitive regex search does not take advantage of collation index Created: 23/Jun/17 Updated: 27/Oct/23 Resolved: 23/Jun/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | 3.4.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | dane truelson | 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 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Steps To Reproduce: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
| Comments |
| Comment by Charlie Swanson [ 26/Jun/17 ] |
|
Hi dtruel, We seem to have some similar requests in SERVER-14196, SERVER-14197, and SERVER-9925, but none of them involve collation as far as I can tell. Give a look over those to see if any of those will satisfy your use case. If not, I'd suggest opening a new ticket describing the functionality you're requesting. Best, |
| Comment by dane truelson [ 23/Jun/17 ] |
|
Hi Thomas, thanks for your quick response. Collation support is awesome, and I'm so grateful that you guys were able to implement it in mongodb. However, it's a significant issue still outstanding that you can't search "starts with" on an index with a collation. For example, I have a CRM type application. People shouldn't have to type a person's full name when searching. Instead, they should be able to type just the first few letters and get a quick result. There is no theoretical reason why this shouldn't work - it is simply a matter of implementing it. Of course, I could always make new fields with a lowercase version, but that is hacky and ugly, and completely nullifies the point in using a collation at all, and definitely goes completely against mongodb's whole mantra of "faster development time". I know I'm not the only person with this use case. Anybody using any form of autocomplete is going to be surprised when this doesn't work, and I suspect that's a lot of people. I think you guys should fast track adding support for this because you have already done the hard part of adding collations, and this would be a great way to top it off. Should I make a new issue requesting this feature? |
| Comment by Kelsey Schubert [ 23/Jun/17 ] |
|
Hello dtruel, Thank you for the report. Looking over the output you've provided, it appears that this is the expected behavior. Unfortunately the regex implementation is not collation-aware and therefore cannot use indexes with a collation specified. I've updated the ticket summary to clarify this behavior. Please note that we've opened Kind regards, |