-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Touch the model when reassigning #87
Comments
@adamcooper Howdy! Rebalancing spreads the records out across the entire integer space. It will touch every record. Maybe you mean rearranging? https://github.com/mixonic/ranked-model/blob/master/lib/ranked-model/ranker.rb#L171 These are the smaller adjustments that avoid rebalancing when possible. You suggest that because |
@mixonic - Yes. Having an option to also update the I had my terminology mixed up with Hm.. I didn't realize the rebalance would update every record in the list. We currently have hooks that update our index from this model. Some lists have 4000 items and to re-index them takes ~10 mins. I guess I may need to override the |
@mixonic - I was thinking along the lines of something like this: zozi@62a743b |
@adamcooper looks great! Happy to merge if you can work up some tests. |
Closing this for now. Happy to look at it again if there's a need. |
Hi,
We are looking at using this gem and it looks like a great fit. We would like to be able to tell what models have changed as a result of the rebalancing. This is because we store the ordering column in a search index and don't want to have to update the entire list when a rebalance occurs.
Would you take a patch upstream that included a config option
touch_record_when_rebalancing
?Thanks,
Adam
The text was updated successfully, but these errors were encountered: