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
-
Method Summary
Modifier and TypeMethodDescriptionfinal JsonProcessor.Builder
Flag that forces the parsed JSON to be added at the top level of the document.final JsonProcessor.Builder
When set toreplace
, root fields that conflict with fields from the parsed JSON will be overridden.final JsonProcessor.Builder
allowDuplicateKeys
(Boolean value) When set totrue
, the JSON parser will not fail if the JSON contains duplicate keys.build()
Builds aJsonProcessor
.final JsonProcessor.Builder
Required - The field to be parsed.protected JsonProcessor.Builder
self()
final JsonProcessor.Builder
targetField
(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_, ignoreFailure, 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
-
addToRoot
Flag that forces the parsed JSON to be added at the top level of the document.target_field
must 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_root
is 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:
self
in classProcessorBase.AbstractBuilder<JsonProcessor.Builder>
-
build
Builds aJsonProcessor
.- Specified by:
build
in interfaceObjectBuilder<JsonProcessor>
- Throws:
NullPointerException
- if some of the required fields are null.
-