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

detect_noop doesn't work with null values #11208

Closed
clintongormley opened this issue May 18, 2015 · 3 comments · Fixed by #11210
Closed

detect_noop doesn't work with null values #11208

clintongormley opened this issue May 18, 2015 · 3 comments · Fixed by #11210
Labels
>bug :Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. good first issue low hanging fruit help wanted adoptme

Comments

@clintongormley
Copy link

The detect_noop flag doesn't work if a field contains a null value:

PUT t/t/1
{
  "foo": "baz",
  "bar": "baz"
}

This update request always returns the same version:

POST t/t/1/_update
{
  "doc": {
    "foo": "baz",
    "bar": "baz"
  },
  "detect_noop": true
}

While this one always returns a new version:

POST t/t/1/_update
{
  "doc": {
    "foo": "baz",
    "bar": null
  },
  "detect_noop": true
}
@clintongormley clintongormley added >bug good first issue low hanging fruit help wanted adoptme :Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. labels May 18, 2015
@nik9000
Copy link
Member

nik9000 commented May 18, 2015

Eww. I can have a look in a bit.

nik9000 added a commit to nik9000/elasticsearch that referenced this issue May 18, 2015
If the source contrains a null value for a field then detect_noop should
consider setting it to null again to be a noop.

Closes elastic#11208
@nik9000
Copy link
Member

nik9000 commented May 18, 2015

low hanging fruit indeed.

@ppf2
Copy link
Member

ppf2 commented May 18, 2015

@nik9000 @clintongormley Thx for the super quick turnaround on this 👍

nik9000 added a commit to nik9000/elasticsearch that referenced this issue May 18, 2015
If the source contrains a null value for a field then detect_noop should
consider setting it to null again to be a noop.

Closes elastic#11208
jpountz pushed a commit that referenced this issue May 19, 2015
If the source contrains a null value for a field then detect_noop should
consider setting it to null again to be a noop.

Closes #11208
jpountz pushed a commit that referenced this issue May 19, 2015
If the source contrains a null value for a field then detect_noop should
consider setting it to null again to be a noop.

Closes #11208
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. good first issue low hanging fruit help wanted adoptme
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants