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

Make reindex and lang-javascript compatible #19933

Merged
merged 1 commit into from
Aug 11, 2016

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Aug 10, 2016

Fixes two issues:

  1. lang-javascript doesn't support executable with a null vars
    parameters. The parameter is quite nullable.
  2. reindex didn't support script engines who's unwrap method wasn't
    a noop. This didn't come up for lang-groovy or lang-painless because
    both of those unwraps were noops. lang-javascript copys all maps that
    it unwraps.

This adds fairly low level unit tests for these fixes but dosen't add
an integration test that makes sure that reindex and lang-javascript
play well together. That'd make backporting this difficult and would
add a fairly significant amount of time to the build for a fairly rare
interaction. Hopefully the unit tests will be enough.

return new HashMap<>((Map<?, ?>) value);
}
}
// Others just return the objects plain (groovy, painless)
return value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes the executable script not that simple anymore ;)

@jpountz
Copy link
Contributor

jpountz commented Aug 10, 2016

LGTM

Fixes two issues:
1. lang-javascript doesn't support `executable` with a `null` `vars`
parameters. The parameter is quite nullable.
2. reindex didn't support script engines who's `unwrap` method wasn't
a noop. This didn't come up for lang-groovy or lang-painless because
both of those `unwrap`s were noops. lang-javascript copys all maps that
it `unwrap`s.

This adds fairly low level unit tests for these fixes but dosen't add
an integration test that makes sure that reindex and lang-javascript
play well together. That'd make backporting this difficult and would
add a fairly significant amount of time to the build for a fairly rare
interaction. Hopefully the unit tests will be enough.
@nik9000 nik9000 merged commit e07e5d6 into elastic:master Aug 11, 2016
@nik9000
Copy link
Member Author

nik9000 commented Aug 11, 2016

2.4: 031d471

@lcawl lcawl added :Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. and removed :Reindex API labels Feb 13, 2018
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. v2.4.0 v5.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants