Elasticsearch self.published? -


i using elasticsearch-rails gem site need create custom callbacks. https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-model#custom-callbacks confused 1 thing. means if self.published? on code? try use models

after_commit on: [:update]   place.__elasticsearch__.update_document if self.published? end 

but model in console see self.published? => false don`t know means

from document of elasticsearch-rails.

for activerecord-based models, use after_commit callback protect data against inconsistencies caused transaction rollbacks:

i think used make sure updated database before sync elasticsearch server


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -