fix(search): make FalkorDB tie-breaking deterministic#1644
Conversation
|
I have read the CLA Document and I hereby sign the CLA behalf on myself, e-mail: example@example.com or I have read the CLA Document and I hereby sign the CLA behalf of my company, e-mail: example@example.com Signature is valid for 6 months. This bot will be retriggered when the Contributor License Agreement comment has been provided. Posted by the CLA Assistant Lite bot. |
|
@jaimehgb Reproduced the nondeterminism: the same 6 tied-score nodes inserted in different orders came back in different orders, and with your patch both come back in identical UUID order. 15 tests pass. Only thing left is a ruff format run on the test file (that's the failing check) and the CLA. |
Summary
This prevents database iteration order and input insertion order from changing capped search results when scores tie.
Tests
pytest --confcutdir tests/utils/search tests/utils/search/deterministic_tie_breaks_test.py tests/utils/search/search_utils_test.py -q(20 passed)