Class JsonProcessor.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch.ingest.ProcessorBase.AbstractBuilder<JsonProcessor.Builder>
co.elastic.clients.elasticsearch.ingest.JsonProcessor.Builder
- All Implemented Interfaces:
WithJson<JsonProcessor.Builder>,ObjectBuilder<JsonProcessor>
- Enclosing class:
- JsonProcessor
public static class JsonProcessor.Builder
extends ProcessorBase.AbstractBuilder<JsonProcessor.Builder>
implements ObjectBuilder<JsonProcessor>
Builder for
JsonProcessor.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal JsonProcessor.BuilderFlag that forces the parsed JSON to be added at the top level of the document.final JsonProcessor.BuilderWhen set toreplace, root fields that conflict with fields from the parsed JSON will be overridden.final JsonProcessor.BuilderallowDuplicateKeys(Boolean value) When set totrue, the JSON parser will not fail if the JSON contains duplicate keys.build()Builds aJsonProcessor.final JsonProcessor.BuilderRequired - The field to be parsed.protected JsonProcessor.Builderself()final JsonProcessor.BuildertargetField(String value) The field that the converted structured object will be written into.Methods inherited from class co.elastic.clients.elasticsearch.ingest.ProcessorBase.AbstractBuilder
description, if_, if_, ignoreFailure, onFailure, onFailure, onFailure, onFailure, tagMethods 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
-
addToRoot
Flag that forces the parsed JSON to be added at the top level of the document.target_fieldmust not be set when this option is chosen.API name:
add_to_root -
addToRootConflictStrategy
public final JsonProcessor.Builder addToRootConflictStrategy(@Nullable JsonProcessorConflictStrategy value) When set toreplace, root fields that conflict with fields from the parsed JSON will be overridden. When set tomerge, conflicting fields will be merged. Only applicableif add_to_rootis set to true.API name:
add_to_root_conflict_strategy -
allowDuplicateKeys
When set totrue, the JSON parser will not fail if the JSON contains duplicate keys. Instead, the last encountered value for any duplicate key wins.API name:
allow_duplicate_keys -
field
Required - The field to be parsed.API name:
field -
targetField
The field that the converted structured object will be written into. Any existing content in this field will be overwritten.API name:
target_field -
self
- Specified by:
selfin classProcessorBase.AbstractBuilder<JsonProcessor.Builder>
-
build
Builds aJsonProcessor.- Specified by:
buildin interfaceObjectBuilder<JsonProcessor>- Throws:
NullPointerException- if some of the required fields are null.
-