elasticsearch-rails

https://github.com/elastic/elasticsearch-rails

Ruby

Elasticsearch integrations for ActiveModel/Record and Ruby on Rails

Elasticsearch::Model::Indexing::InstanceMethods#update_document

Tries to gather the changed attributes of a model instance
(via [ActiveModel::Dirty](http://api.rubyonrails.org/classes/ActiveModel/Dirty.html)),
performing a _partial_ update of the document.

When the changed attributes are not available, performs full re-index of the record.

See the {#update_document_attributes} method for updating specific attributes directly.

Source | Google | Stack overflow

Edit

git clone [email protected]:elastic/elasticsearch-rails.git

cd elasticsearch-rails

open elasticsearch-model/lib/elasticsearch/model/indexing.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Elasticsearch--Model--Indexing--InstanceMethods-update_document-for-pr


# Commit to git

git add elasticsearch-model/lib/elasticsearch/model/indexing.rbgit commit -m "better docs for Elasticsearch::Model::Indexing::InstanceMethods#update_document"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Elasticsearch--Model--Indexing--InstanceMethods-update_document-for-pr

hub pull-request


# Celebrate!