diff --git a/README.md b/README.md index 5edf3b1..1ef6647 100644 --- a/README.md +++ b/README.md @@ -655,6 +655,23 @@ class Product < ActiveRecord::Base end ``` +Asynchronous reindexing + +```ruby +class Product < ActiveRecord::Base + searchkick callbacks: false + + # add the callbacks manually + after_save :reindex_async + after_destroy :reindex_async + + def reindex_async + # delayed job + delay.reindex + end +end +``` + Reindex all models (Rails only) ```sh -- libgit2 0.21.0