Skip to content

Commit 1a5677b

Browse files
committed
Add global auto-indexing switch to README
1 parent 2875709 commit 1a5677b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -909,10 +909,18 @@ end
909909
You can temporarily disable auto-indexing using the without_auto_index scope:
910910

911911
```ruby
912+
# disable Book's auto-indexing
912913
Book.without_auto_index do
913914
# Inside this block, auto indexing task will not run.
914915
1.upto(10000) { Book.create! attributes }
915916
end
917+
918+
# disable all auto-indexing
919+
Meilisearch::Rails.without_auto_index do
920+
# Inside this block, auto indexing task will not run.
921+
1.upto(10000) { Book.create! attributes }
922+
1.upto(10000) { User.create! user_attributes }
923+
end
916924
```
917925

918926
## ⚙️ Development workflow & contributing

0 commit comments

Comments
 (0)