Class InferenceProcessor.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch.ingest.ProcessorBase.AbstractBuilder<InferenceProcessor.Builder>
co.elastic.clients.elasticsearch.ingest.InferenceProcessor.Builder
- All Implemented Interfaces:
WithJson<InferenceProcessor.Builder>
,ObjectBuilder<InferenceProcessor>
- Enclosing class:
- InferenceProcessor
public static class InferenceProcessor.Builder
extends ProcessorBase.AbstractBuilder<InferenceProcessor.Builder>
implements ObjectBuilder<InferenceProcessor>
Builder for
InferenceProcessor
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aInferenceProcessor
.Maps the document field names to the known field names of the model.Maps the document field names to the known field names of the model.ignoreMissing
(Boolean value) If true and any of the input fields defined in input_ouput are missing then those missing fields are quietly ignored, otherwise a missing field causes a failure.inferenceConfig
(InferenceConfig value) Contains the inference type and its options.Contains the inference type and its options.Contains the inference type and its options.inputOutput
(InputConfig value, InputConfig... values) Input fields for inference and output (destination) fields for the inference results.Input fields for inference and output (destination) fields for the inference results.inputOutput
(List<InputConfig> list) Input fields for inference and output (destination) fields for the inference results.Required - The ID or alias for the trained model, or the ID of the deployment.protected InferenceProcessor.Builder
self()
targetField
(String value) Field added to incoming documents to contain results objects.Methods inherited from class co.elastic.clients.elasticsearch.ingest.ProcessorBase.AbstractBuilder
description, if_, if_, ignoreFailure, onFailure, onFailure, onFailure, onFailure, tag
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
modelId
Required - The ID or alias for the trained model, or the ID of the deployment.API name:
model_id
-
targetField
Field added to incoming documents to contain results objects.API name:
target_field
-
fieldMap
Maps the document field names to the known field names of the model. This mapping takes precedence over any default mappings provided in the model configuration.API name:
field_map
Adds all entries of
map
tofieldMap
. -
fieldMap
Maps the document field names to the known field names of the model. This mapping takes precedence over any default mappings provided in the model configuration.API name:
field_map
Adds an entry to
fieldMap
. -
inferenceConfig
Contains the inference type and its options.API name:
inference_config
-
inferenceConfig
public final InferenceProcessor.Builder inferenceConfig(Function<InferenceConfig.Builder, ObjectBuilder<InferenceConfig>> fn) Contains the inference type and its options.API name:
inference_config
-
inferenceConfig
Contains the inference type and its options.API name:
inference_config
-
inputOutput
Input fields for inference and output (destination) fields for the inference results. This option is incompatible with the target_field and field_map options.API name:
input_output
Adds all elements of
list
toinputOutput
. -
inputOutput
Input fields for inference and output (destination) fields for the inference results. This option is incompatible with the target_field and field_map options.API name:
input_output
Adds one or more values to
inputOutput
. -
inputOutput
public final InferenceProcessor.Builder inputOutput(Function<InputConfig.Builder, ObjectBuilder<InputConfig>> fn) Input fields for inference and output (destination) fields for the inference results. This option is incompatible with the target_field and field_map options.API name:
input_output
Adds a value to
inputOutput
using a builder lambda. -
ignoreMissing
If true and any of the input fields defined in input_ouput are missing then those missing fields are quietly ignored, otherwise a missing field causes a failure. Only applies when using input_output configurations to explicitly list the input fields.API name:
ignore_missing
-
self
- Specified by:
self
in classProcessorBase.AbstractBuilder<InferenceProcessor.Builder>
-
build
Builds aInferenceProcessor
.- Specified by:
build
in interfaceObjectBuilder<InferenceProcessor>
- Throws:
NullPointerException
- if some of the required fields are null.
-