Skip to content
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

Document rebuilding process #4

Open
nirvdrum opened this issue Jan 1, 2020 · 2 comments
Open

Document rebuilding process #4

nirvdrum opened this issue Jan 1, 2020 · 2 comments

Comments

@nirvdrum
Copy link

nirvdrum commented Jan 1, 2020

As far as I can tell, this library provides everything needed to rebuild the rankings for a list. But, there doesn't appear to be a utility method to pull everything together. It'd be helpful if there were a section in the documentation on how to generate the next bucket and start re-ranking items from the old bucket into the new bucket.

@loicbisiere
Copy link

Yes, I'm surprised that public static between(oLeft: LexoDecimal, oRight: LexoDecimal) doesn't check if there is still 'place' between two ranks, so we could fallback by rebuilding the list (change buckets?) before trying to call between again.

Full disclosure: I discover lexorank few hours ago, and there's probably something I don't understand.

@mansona
Copy link

mansona commented May 1, 2022

I too have only just discovered this algorithm and library in the last few hours and I am also surprised that we don't have some sort of failure case that is obvious in the code 🤔 I started looking through the function and the ones that it calls and I couldn't see an obvious thrown error (at least not one that was quite as obvious as the initial check at the top of the function).

I guess I would expect the system to error in the case that there is no space and then that is a signal to the caller that it's time to rebalance. Does that sound right to people? If so then I can think about putting together a test to illustrate this situation and see if it currently throws an error 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants