- 
    Type:
Improvement
 - 
    Resolution: Unresolved
 - 
    Priority:
Major - P3
 - 
    None
 - 
    Affects Version/s: None
 - 
    Component/s: Aggregation Framework
 
- 
        Query Optimization
 - 
        Query 2019-08-12
 - 
        (copied to CRM)
 - 
        None
 
- 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 
We added $toHashedIndexKey in SERVER-49214 which solves some similar use cases, and some described below in the original description and comments. This ticket remains open to add a more general hash expression - perhaps for more cryptographic use cases, or if someone wants/needs a particular algorithm.
Original Description
Oracle has http://docs.oracle.com/database/121/SQLRF/functions183.htm#SQLRF55647 which computes one of several standard hash functions on a particular column.
It would be nice if there was analogous expression in agg:
hashMD5:{$hash:{source:"$expression", function:"MD5"}}
or something like that.
- is duplicated by
 - 
                    
SERVER-104650 Add a $bsonHash aggregation operator
-         
 - Open
 
 -         
 
- is related to
 - 
                    
SERVER-49214 Add $toHashedIndexKey expression
-         
 - Closed
 
 -         
 
- related to
 - 
                    
SERVER-104650 Add a $bsonHash aggregation operator
-         
 - Open
 
 -         
 - 
                    
SERVER-69128 Server-side document hashing
-         
 - Closed
 
 -