lib/tire/model/search.rb
# Updates the index in _Elasticsearch_.
#
# On model instance create or update, it will store its serialized representation in the index.
#
# On model destroy, it will remove the corresponding document from the index.
#
# It will also execute any `<after|before>_update_elasticsearch_index` callback hooks.
#
Updates the index in _Elasticsearch_.
On model instance create or update, it will store its serialized representation in the index.

On model destroy, it will remove the corresponding document from the index.

It will also execute any `_update_elasticsearch_index` callback hooks.
Updates the index in _Elasticsearch_ . On model instance create or update it will store its serialized representation in the index . On model destroy it will remove the corresponding document from the index . It will also execute any ` _update_elasticsearch_index ` callback hooks .
def update_index
          instance.run_callbacks :update_elasticsearch_index do
            if instance.destroyed?
              index.remove instance
            else
              @response = index.store( instance, {:percolate => percolator} )
              instance.tire.matches = @response['matches'] if instance.tire.respond_to?(:matches=)
              self
            end
          end
        end
def update_index instance . run_callbacks :update_elasticsearch_index do if instance . destroyed? index . remove instance else @response = index . store ( instance , { :percolate => percolator } ) instance . tire . matches = @response [ 'matches' ] if instance . tire . respond_to? ( :matches= ) self end end end
Updates the index in _Elasticsearch_.
Updates the index in _Elasticsearch_ .