I am using elasticsearch-rails gem for an app. setup all code as required and mentioned in document. My question is whenever a new record is created how do you import new record data to elasticsearch. The model callbacks isnt working as expected.
include Elasticsearch::Model::Callbacks
Thanks, Aashish
You should include this in your model:
include Elasticsearch::Model
If you want to integrate with AR callback include this then:
Elasticsearch::Model::Callbacks
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.