[SERVER-10413] mongodb Text Search with wild card Created: 02/Aug/13 Updated: 28/Dec/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Text Search |
| Affects Version/s: | 2.4.5 |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | nirav | Assignee: | Backlog - Query Integration |
| Resolution: | Unresolved | Votes: | 18 |
| Labels: | qi-text-search | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Integration
|
||||||||
| Participants: | |||||||||
| Description |
|
Is test search missing capability of utilizing wild cards(*, ?) in "text' command. ) |
| Comments |
| Comment by nirav [ 14/Aug/13 ] |
|
Thanks for making it "feature request". Problem with using regular expression is that it's very slow for us as we have so many search terms which starts with wildcard characters. |
| Comment by J Rassi [ 12/Aug/13 ] |
|
You can use dot (the "wildcard" character) in a regular expression predicate, e.g. db.collection.find({field:/the.*hartford/}), but not in a text search string. When querying a text index, your such string must include a list of terms and/or exact phrases. You can specify a regular expression predicate as an additional filter to a text search, e.g db.collection.runCommand("text",{search:"hartford",filter:{field:/the.*hartford/)}}, but note that the filter will not use the text index. I converted the type of this ticket to a feature request. |