Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Document Partial Updates #18

Open
robvolk opened this issue Jan 24, 2017 · 2 comments
Open

Support for Document Partial Updates #18

robvolk opened this issue Jan 24, 2017 · 2 comments
Milestone

Comments

@robvolk
Copy link

robvolk commented Jan 24, 2017

I'd like to use Elastic's Update API to make partial or scripted update to an existing document. Any plans on adding this? thanks in advance!

@robvolk
Copy link
Author

robvolk commented Feb 4, 2017

Here's the code I used and I'll try to open a PR at some point:

uri = "#{Elastix.config(:uri)}/index_name/type/#{id}/_update"
    body = %{
      script: %{
        inline: "ctx._source.tags.add(params.tag)",
        lang: "painless",
        params: %{
          tag: %{
            name: name,
          }
        }
      }
    }

    {_, response} = Elastix.HTTP.post(uri, Poison.encode!(body))

@werbitzky
Copy link
Owner

Would be a good next feature! I'll milestone it for the next version.

@werbitzky werbitzky added this to the v0.4.0 milestone Mar 1, 2017
@werbitzky werbitzky modified the milestones: v0.5.0, v0.4.0 Apr 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants