Commit 6b92c8bd9123b5fd33ebb7235b2c6aed7247ddb4
1 parent
31e15475
Exists in
master
and in
19 other branches
Added refresh interval section [skip ci]
Showing
1 changed file
with
14 additions
and
0 deletions
Show diff stats
README.md
... | ... | @@ -1182,6 +1182,20 @@ And use: |
1182 | 1182 | Searchkick.reindex_status(index_name) |
1183 | 1183 | ``` |
1184 | 1184 | |
1185 | +### Refresh Interval | |
1186 | + | |
1187 | +Specify a longer refresh interval while indexing to increase performance. | |
1188 | + | |
1189 | +```ruby | |
1190 | +Product.reindex(async: true, refresh_interval: "30s") | |
1191 | +``` | |
1192 | + | |
1193 | +When promoting, have it restored to the value specified in your mapping (defaults to `1s`). | |
1194 | + | |
1195 | +```ruby | |
1196 | +Product.search_index.promote(index_name, update_refresh_interval: true) | |
1197 | +``` | |
1198 | + | |
1185 | 1199 | ### Queuing |
1186 | 1200 | |
1187 | 1201 | Push ids of records needing reindexed to a queue and reindex in bulk for better performance. First, set up Redis in an initializer. | ... | ... |