elasticsearch-ruby
https://github.com/elastic/elasticsearch-ruby
Ruby
Ruby integrations for Elasticsearch
Elasticsearch::API::Actions#index
Create or update a document.
The `index` API will either _create_ a new document, or _update_ an existing one, when a document `:id`
is passed. When creating a document, an ID will be auto-generated, when it's not passed as an argument.
You can specifically enforce the _create_ operation by settint the `op_type` argument to `create`, or
by using the {Actions#create} method.
Optimistic concurrency control is performed, when the `version` argument is specified. By default,
no version checks are performed.
By default, the document will be available for {Actions#get} immediately, for {Actions#search} only
after an index refresh operation has been performed (either automatically or manually).Edit
git clone [email protected]:elastic/elasticsearch-ruby.git
cd elasticsearch-ruby
open elasticsearch-api/lib/elasticsearch/api/actions/index.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Elasticsearch--API--Actions-index-for-pr
# Commit to gitgit add elasticsearch-api/lib/elasticsearch/api/actions/index.rbgit commit -m "better docs for Elasticsearch::API::Actions#index"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Elasticsearch--API--Actions-index-for-pr
hub pull-request
# Celebrate!