diff --git a/README.md b/README.md index a4854f1..5929fb1 100644 --- a/README.md +++ b/README.md @@ -592,6 +592,14 @@ There are four strategies for keeping the index synced with your database. end ``` + And reindex a record or relation manually. + + ```ruby + product.reindex + # or + store.products.reindex(mode: :async) + ``` + You can also do bulk updates. ```ruby @@ -608,6 +616,12 @@ Searchkick.callbacks(false) do end ``` +Or override the model’s strategy. + +```ruby +product.reindex(mode: :async) # :inline or :queue +``` + ### Associations Data is **not** automatically synced when an association is updated. If this is desired, add a callback to reindex: -- libgit2 0.21.0