Skip to content

ScriptFile parameter for NEST UpdateDescriptor #1459

@vineet85

Description

@vineet85

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions