Skip to content

Should BulkUpdateOperation & IBulkUpdateOperation be changed to use IScript? #2357

@awelburn

Description

@awelburn

NEST/Elasticsearch.Net version: 5.0.0-rc1
Elasticsearch version: 5.0.0

This is related to #2343 / #2342

Reading the spec at https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
I think the change is similar - removal of properties for Lang, Script, ScriptId, ScriptFile, Params and replaced with an IScript Script property.

the currently generated request looks similar to this:
POST /test/doc/_bulk
{"update": { "_id":1}}
{"upsert":{"id":1,"script":""} }

and gives an error of "script or doc is missing"

but changing the properties in BulkUpdateOperation produces a request similar to

POST /test/doc/_bulk
{"update":{"_id":1}}
{"upsert":{"id":1},"script":{"inline":""}}

which returns with "Cannot generate an empty script." - which is expected!

Metadata

Metadata

Assignees

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