Closed akostadinov closed 1 month ago
Not sure why test / manticore (2.7, 5_2, mysql2, 6.0.0, manticore) (pull_request)
failed. I don't see any change related to it and the postgres variant (along all other runners) pass. Maybe just rerun it?
Thanks @akostadinov - I've rebased this to resolve the build failures (not your fault!), renamed the method from stage
to sync
, and merged it in. Hoping to get a release of the gem out this evening 🤞🏻
When an index is defined, one can specify a scope. This scope is used to obtain records on initial indexing (ts:index) but is not respected by the model callbacks.
With this additional method one can easily implement ActiveRecord callbacks e.g.
A little bit more efficient (preventing a database roundtrip on deletes
If certain models never use scopes for their indices, then
#upsert
can be called instead of#stage
to avoid database roundtrips.While on it, example background processing of indexing operations e.g.
fixes #1253 complements #1216 and #1215