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

.Lang() not allowed to be specified as parameter in 6.0 on update request. #2935

Closed
tdoman opened this issue Dec 8, 2017 · 7 comments
Closed

Comments

@tdoman
Copy link

tdoman commented Dec 8, 2017

NEST 6.1.0-ci1208153011

The NEST library allows it to be specified but ES 6.0 responds with:
"request [/myindex/mytype/1/_update] contains unrecognized parameter: [lang]"

var response = await client.UpdateAsync<T, object>(id, u => u.Index(index).Type(type).Lang("painless").Script(s => s.Indexed(scriptFile).Params(parms)).RetryOnConflict(5));

@tdoman
Copy link
Author

tdoman commented Dec 9, 2017

I'm seeing this in some other contexts (ie. ScriptDescriptor) in my code as well where the .Lang() function is being exposed in script contexts where it shouldn't. lang can no longer be specified...

This was referenced Dec 12, 2017
@russcam
Copy link
Contributor

russcam commented Dec 14, 2017

Hey @tdoman, Lang() is allowed in the body, but not as a query string parameter.
Merged 6.x script changes in #2951 and #2933.

Thanks for reporting this 👍

@russcam russcam closed this as completed Dec 14, 2017
@russcam
Copy link
Contributor

russcam commented Dec 14, 2017

Apologies @tdoman, my last comment was incorrect. Lang() is not allowed in places that reference a script. It is allowed in the Put Script API

@tdoman
Copy link
Author

tdoman commented Dec 14, 2017

@russcam Yep, NEST had been allowing me to specify .Lang() but ES 6.0 was rejecting it as a query string parameter. Thanks for fixing all these, are they in the 12/14 build? If so, I can try 'em all out. I believe this will also represent 100% coverage on all our current usages, woot!

@tdoman
Copy link
Author

tdoman commented Dec 14, 2017

@russcam I grabbed the 12/14 build, looks great! Just more thorough testing to do, thanks for all the work, looking forward to the official ship of NEST 6.0!

@russcam
Copy link
Contributor

russcam commented Dec 15, 2017

@tdoman NEST-6.0.0-beta1 is up on Nuget if you're like to take that for a spin; it's very near to what we expect to be in the GA release and we have released it to nuget in order to garner wider feedback.

@tdoman
Copy link
Author

tdoman commented Dec 15, 2017

Sweet, I will pull that from Nuget and give it a spin, thanks Russ!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants