Class PainlessContextSetupDescriptor
Sets up contextual scope for the painless script the execute under.
Inheritance
PainlessContextSetupDescriptor
Assembly: OpenSearch.Client.dll
Syntax
public class PainlessContextSetupDescriptor : DescriptorBase<PainlessContextSetupDescriptor, IPainlessContextSetup>, IDescriptor, IPainlessContextSetup
Methods
|
Edit this page
View Source
Document<T>(T)
Contains the document that will be temporarily indexed in-memory and is accessible from the script.
Declaration
public PainlessContextSetupDescriptor Document<T>(T document)
Parameters
Type |
Name |
Description |
T |
document |
|
Returns
Type Parameters
|
Edit this page
View Source
Index(IndexName)
The name of an index containing a mapping that is compatible with the document being indexed.
Declaration
public PainlessContextSetupDescriptor Index(IndexName index)
Parameters
Returns
|
Edit this page
View Source
Query<T>(Func<QueryContainerDescriptor<T>, QueryContainer>)
If _score is used in the script then a query can specified that will be used to compute a score.
Declaration
public PainlessContextSetupDescriptor Query<T>(Func<QueryContainerDescriptor<T>, QueryContainer> querySelector) where T : class
Parameters
Returns
Type Parameters
Implements
Extension Methods