I am using Tire in ruby on rails to connect with ElastiSearch.
When I modify an element’s parameters with update_attributes, Tire automatically updates the index to reflect this change.
However, when I modify many elements simultaneously by doing update_all, Tire does not update the index, and it becomes out of sync with my database.
Is this a bug in Tire? Is there a workaround?
As per ActiveRecord#update_all documentation:
So Tire does not update anything, because the callbacks are not called…
You have to either:
a) use
find_eachand call thesavemethodb) use
update_all, but then do a full re-index.