Added support for random_score function:

 * can be used to return matching results in random order

 Closes #1170