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

Update API: Detect noop updates #6822

Closed
nik9000 opened this Issue Jul 10, 2014 · 2 comments

Comments

Projects
None yet
3 participants
@nik9000
Copy link
Contributor

commented Jul 10, 2014

Some source systems (like mine) don't have an easy way to check if an update is actually a noop. You could implement this check using update scripts but its a bit jangly to do generically. It'd be way more convenient if you could have Elasticsearch do the detection for you. Something like:

curl -XPOST 'localhost:9200/test/type1/1/_update' -d '{
    "doc" : {
        "name" : "new_name"
    },
    "doc_as_upsert" : true,
    "detect_noop": true
}'

Detecting the noop rather then just performing the update could prevent extra writes and deleted documents.

Secondarily, it might be cool to be able to specify tolerances for numeric fields so small changes could be ignored but that might be out of scope for any initial implementation.

@nik9000

This comment has been minimized.

Copy link
Contributor Author

commented Jul 11, 2014

If this is interesting to folks I can implement it. It feels like it'd be useful to me and MVEL was not cutting it to do this.

@nik9000

This comment has been minimized.

Copy link
Contributor Author

commented Jul 14, 2014

Implementing.

nik9000 added a commit to nik9000/elasticsearch that referenced this issue Jul 14, 2014

Detect noop updates sent with doc_as_upsert
This should help prevent spurious updates that just cause extra writing
and cache invalidation for no real reason.

Close elastic#6822

jpountz added a commit that referenced this issue Jul 22, 2014

Update: Detect noop updates sent with doc_as_upsert
This should help prevent spurious updates that just cause extra writing
and cache invalidation for no real reason.

Close #6822

@jpountz jpountz closed this in 79433d2 Jul 22, 2014

@jpountz jpountz changed the title Detecting noop updates Update: Detecting noop updates Jul 22, 2014

@jpountz jpountz added v1.4.0 and removed adoptme labels Jul 22, 2014

@jpountz jpountz self-assigned this Jul 22, 2014

javanna added a commit that referenced this issue Aug 13, 2014

Update api & Indices stats: fixed version checks for no-op updates wh…
…ich got in after 1.3 was released

Also added basic bw comp test for indices stats api.

Relates to #6822

javanna added a commit that referenced this issue Aug 13, 2014

Update api & Indices stats: fixed version checks for no-op updates wh…
…ich got in after 1.3 was released

Also added basic bw comp test for indices stats api.

Relates to #6822

javanna added a commit that referenced this issue Sep 8, 2014

Update api & Indices stats: fixed version checks for no-op updates wh…
…ich got in after 1.3 was released

Also added basic bw comp test for indices stats api.

Relates to #6822

@clintongormley clintongormley changed the title Update: Detecting noop updates Update API: Detect noop updates Sep 10, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.