elasticsearch/elasticsearch — pull request #7446 by rjernst (2014-08-25 23:27:34+00:00)
Title: FunctionScore: Refactor RandomScoreFunction to be consistent, and return values in range [0.0, 1.0]

RandomScoreFunction previously relied on the order the documents were
iterated in from Lucene. This caused changes in ordering, with the same
seed, if documents moved to different segments. With this change, a
murmur32 hash of the _uid for each document is used as the "random"
value. Also, the hash is adjusted so as to only return values between
0.0 and 1.0 to enable easier manipulation to fit into users' scoring
models.

closes #6907