Creates a simple sort function closing on the desired sort polarity. MongoDB documents are compared as leaf data, with data type being the highest priority.