0

Hi I am using searchkiq gem for elastic search. I got a situation where I need to maintain the indexes which will be used for normal situation and some indexes in only for requested scenario that might come or not. The properties I want to index as primary and secondary. Primary will be indexed on callbacks etc. And secondary will be indexed only on demand, say from console or any button from admin panel.

How can I accomplish this.

Thanks in advance

jbmyid
  • 1,985
  • 19
  • 22

1 Answers1

0

Searchkick automatically reindexes your ActiveRecord after commit.

To disable this:

searchkick callbacks: false

And to reindex on demand, you can just call YourModel.reindex

Igor Belo
  • 718
  • 6
  • 14