Ivan Pais
Ivan Pais

Reputation: 3

Nest (ElasticSearch) Update using script from sandbox

Using NEST is there a way to invoke a script from the sandbox. In the Update Descriptor, there is ability to set the "Script", however there does not seem to be a way to instead set the script_id, which is needed. My instance of ES does not enable dynamic scripts, and I have to use the scrips from the sandbox.

The raw version of what I need to do would be something like:

POST \MyIndex\MyType\1\_update { "script_id" : "sandboxScript", "lang" : "groovy", "params" : {"Param1":"value1"} }

However there does not seem to be a way to set the Script Id in the UpdateDescriptor. How can this be done?

Thanks in advance.

Upvotes: 0

Views: 492

Answers (1)

Rob
Rob

Reputation: 9979

Regarding ES documentation script_id parameter was introduced in 1.4.0 version.

http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.3/docs-update.html http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.4/docs-update.html

This feature is already available in the current develop branch of NEST, so you can use it or wait for version 1.4.0.

Cheers, Robert.

Upvotes: 0

Related Questions