Skip to content

Commit

Permalink
Added asynchronous reindexing to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Jan 21, 2014
1 parent 79d36e8 commit a8592a9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a8592a9

Please sign in to comment.