Class ExecutePainlessScriptDescriptor
The Painless execute API allows an arbitrary script to be executed and a result to be returned.
Inheritance
RequestDescriptorBase<ExecutePainlessScriptDescriptor, ExecutePainlessScriptRequestParameters, IExecutePainlessScriptRequest>
ExecutePainlessScriptDescriptor
Implements
Inherited Members
Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
public class ExecutePainlessScriptDescriptor : RequestDescriptorBase<ExecutePainlessScriptDescriptor, ExecutePainlessScriptRequestParameters, IExecutePainlessScriptRequest>, IDescriptor, IExecutePainlessScriptRequest, IRequest<ExecutePainlessScriptRequestParameters>, IRequest
Methods
| Edit this page View SourceContext(string)
The context the script should be executed in
Declaration
public ExecutePainlessScriptDescriptor Context(string context)
Parameters
Type | Name | Description |
---|---|---|
string | context |
Returns
Type | Description |
---|---|
ExecutePainlessScriptDescriptor |
ContextSetup(Func<PainlessContextSetupDescriptor, IPainlessContextSetup>)
Sets up contextual scope for the painless script the execute under.
Declaration
public ExecutePainlessScriptDescriptor ContextSetup(Func<PainlessContextSetupDescriptor, IPainlessContextSetup> selector)
Parameters
Type | Name | Description |
---|---|---|
Func<PainlessContextSetupDescriptor, IPainlessContextSetup> | selector |
Returns
Type | Description |
---|---|
ExecutePainlessScriptDescriptor |
Script(Func<InlineScriptDescriptor, IInlineScript>)
The script to execute
Declaration
public ExecutePainlessScriptDescriptor Script(Func<InlineScriptDescriptor, IInlineScript> selector)
Parameters
Type | Name | Description |
---|---|---|
Func<InlineScriptDescriptor, IInlineScript> | selector |
Returns
Type | Description |
---|---|
ExecutePainlessScriptDescriptor |