Skip to content

ScriptFile parameter for NEST UpdateDescriptor #1459

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

Closed
vineet85 opened this issue Jun 15, 2015 · 6 comments
Closed

ScriptFile parameter for NEST UpdateDescriptor #1459

vineet85 opened this issue Jun 15, 2015 · 6 comments

Comments

@vineet85
Copy link

Re: #1456

Can this be added to the BulkUpdateDescriptor as well?

https://github.com/elastic/elasticsearch-net/blob/4fcecae93dcf16a4ff7e110135da81eed409dda5/src/Nest/DSL/Bulk/BulkUpdateDescriptor.cs

Eg:-
*BulkDescriptor childBulkDescriptor = new BulkDescriptor();

for (int i = 0; i < searchResponse.Hits.Count(); i++)
{
childBulkDescriptor.Update<NestedDocument, object>(u => u
.Type("document")
.Id(searchResponse.Hits.ElementAt(i).Id) // document id
.ScriptFile("my_script")
.Params(x => x.Add("field_id", fieldIdToUpdate).Add("field_value",
fieldValue))
.RetriesOnConflict(4)
);
}

Thanks,
Vineet

@gmarz gmarz closed this as completed in 699696f Jun 16, 2015
@gmarz
Copy link
Contributor

gmarz commented Jun 16, 2015

Added! Nice catch @vineet85 and thanks again for reporing.

@gmarz gmarz added Bug labels Jun 16, 2015
@vineet85
Copy link
Author

Thanks @gmarz - Any idea when v1.5.2 will be publicly available?

@gmarz
Copy link
Contributor

gmarz commented Jun 16, 2015

Very soon...debating whether to release 1.5.2 or go straight to 1.6 (pending #1453).

@gmarz gmarz added v1.6.0 and removed v1.5.2 labels Jun 19, 2015
@CezarCretu
Copy link

This doesn't seem to be working for me using the newly-released 1.6.
I've checked the deserialized request body and the value set for ScriptFile isn't included.

Should ScriptFile and ScriptId not be added in BulkUpdateBody and be set here or am I just missing something?

@gmarz
Copy link
Contributor

gmarz commented Jun 23, 2015

Argh, yes, you're right @CezarCretu. This is my bad...we'll fix and release a 1.6.1 asap.

@gmarz
Copy link
Contributor

gmarz commented Jun 23, 2015

FYI I opened #1463 for this.

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

3 participants