[SERVER-6773] Aggregation operator $split for splitting string based on a separator Created: 15/Aug/12 Updated: 03/May/17 Resolved: 26/Apr/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.6 |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | Rafael Calsaverini | Assignee: | Benjamin Murphy |
| Resolution: | Done | Votes: | 16 |
| Labels: | expression | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||
| Sprint: | Query 12 (04/04/16), Query 13 (04/22/16), Query 14 (05/13/16) | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Description |
|
Syntax
Examples
Notes
Errors
Old Description If I could write something like: {$project : {words : {$split : "$some_textual_field"}} that would result in the string contained in the given field to be turned into a word list (based on whitespaces and punctuation signs, or maybe a regexp defining where to split). This would be tremendously useful for natural language processing and similar tasks. |
| Comments |
| Comment by Benjamin Murphy [ 26/Apr/16 ] |
|
This ticket introduces the $split expression to aggregation, with semantics as described above. It will need to be documented as an aggregation expression, and any driver that supports helpers for aggregation will need to include support for it. |
| Comment by Githook User [ 26/Apr/16 ] |
|
Author: {u'username': u'benjaminmurphy', u'name': u'Benjamin Murphy', u'email': u'benjamin_murphy@me.com'}Message: |
| Comment by Nicholas Johnson [ 17/Jul/15 ] |
|
db.collection.aggregate({$project: {tags: {$split : "$tags"}}}) This would be tremendous. |