Fix Issue 5514 - Erroneous documentation and lacking randomization for topN

http://d.puremagic.com/issues/show_bug.cgi?id=5514