Class TemplateConfig.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<TemplateConfig.Builder>
co.elastic.clients.elasticsearch.core.msearch_template.TemplateConfig.Builder
- All Implemented Interfaces:
WithJson<TemplateConfig.Builder>,ObjectBuilder<TemplateConfig>
- Enclosing class:
- TemplateConfig
public static class TemplateConfig.Builder
extends WithJsonObjectBuilderBase<TemplateConfig.Builder>
implements ObjectBuilder<TemplateConfig>
Builder for
TemplateConfig.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aTemplateConfig.final TemplateConfig.BuilderIftrue, returns detailed information about score calculation as part of each hit.final TemplateConfig.BuilderThe ID of the search template to use.final TemplateConfig.BuilderKey-value pairs used to replace Mustache variables in the template.final TemplateConfig.BuilderKey-value pairs used to replace Mustache variables in the template.final TemplateConfig.BuilderIftrue, the query execution is profiled.protected TemplateConfig.Builderself()final TemplateConfig.Buildersource(ScriptSource value) An inline search template.final TemplateConfig.BuilderAn inline search template.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
explain
Iftrue, returns detailed information about score calculation as part of each hit.API name:
explain -
id
The ID of the search template to use. If nosourceis specified, this parameter is required.API name:
id -
params
Key-value pairs used to replace Mustache variables in the template. The key is the variable name. The value is the variable value.API name:
paramsAdds all entries of
maptoparams. -
params
Key-value pairs used to replace Mustache variables in the template. The key is the variable name. The value is the variable value.API name:
paramsAdds an entry to
params. -
profile
Iftrue, the query execution is profiled.API name:
profile -
source
An inline search template. Supports the same parameters as the search API's request body. It also supports Mustache variables. If noidis specified, this parameter is required.API name:
source -
source
public final TemplateConfig.Builder source(Function<ScriptSource.Builder, ObjectBuilder<ScriptSource>> fn) An inline search template. Supports the same parameters as the search API's request body. It also supports Mustache variables. If noidis specified, this parameter is required.API name:
source -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<TemplateConfig.Builder>
-
build
Builds aTemplateConfig.- Specified by:
buildin interfaceObjectBuilder<TemplateConfig>- Throws:
NullPointerException- if some of the required fields are null.
-