-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sortmode for Trie + bugfix score sorting #2952
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Look good, one comment.
Codecov Report
@@ Coverage Diff @@
## master #2952 +/- ##
=======================================
Coverage 81.94% 81.94%
=======================================
Files 180 180
Lines 29429 29430 +1
=======================================
+ Hits 24115 24116 +1
Misses 5314 5314
Continue to review full report at Codecov.
|
* Set sorting of Trie. Sort on write * add cpp tests * Fix for spellcheck * change -1 to INT_MIN * revert -1 * remove tests - add in later PR
Add two sorting modes: by
lexigraphic
order and byscore
order.Sorting mode is set when Trie is initialized.
Sorting node children now takes place on writes only (add/delete). Before this change, nodes were sorted during queries, making the data structure unsafe for multi-readers.
Bug Fix
- The default sort by score had a bug exposed in the test_cpp_trie.replaces #2951