Class UpdateAction<TDocument,TPartialDocument>
java.lang.Object
co.elastic.clients.elasticsearch.core.bulk.UpdateAction<TDocument,TPartialDocument>
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class UpdateAction<TDocument,TPartialDocument>
extends Object
implements JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<UpdateAction<Object,
Object>> Json deserializer forUpdateAction
based on named deserializers provided by the callingJsonMapper
. -
Method Summary
Modifier and TypeMethodDescriptionstatic <TDocument,
TPartialDocument>
JsonpDeserializer<UpdateAction<TDocument,TPartialDocument>> createUpdateActionDeserializer
(JsonpDeserializer<TDocument> tDocumentDeserializer, JsonpDeserializer<TPartialDocument> tPartialDocumentDeserializer) Create a JSON deserializer for UpdateActionfinal Boolean
If true, theresult
in the response is set to 'noop' when no changes to the document occur.final TPartialDocument
doc()
A partial update to an existing document.final Boolean
Set totrue
to use the contents ofdoc
as the value ofupsert
.static <TDocument,
TPartialDocument>
UpdateAction<TDocument,TPartialDocument> of
(Function<UpdateAction.Builder<TDocument, TPartialDocument>, ObjectBuilder<UpdateAction<TDocument, TPartialDocument>>> fn) final Script
script()
The script to run to update the document.final Boolean
Set totrue
to run the script whether or not the document exists.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static <TDocument,
TPartialDocument>
voidsetupUpdateActionDeserializer
(ObjectDeserializer<UpdateAction.Builder<TDocument, TPartialDocument>> op, JsonpDeserializer<TDocument> tDocumentDeserializer, JsonpDeserializer<TPartialDocument> tPartialDocumentDeserializer) final SourceConfig
source()
Iffalse
, source retrieval is turned off.toString()
final TDocument
upsert()
If the document does not already exist, the contents ofupsert
are inserted as a new document.
-
Field Details
-
_DESERIALIZER
Json deserializer forUpdateAction
based on named deserializers provided by the callingJsonMapper
.
-
-
Method Details
-
of
public static <TDocument,TPartialDocument> UpdateAction<TDocument,TPartialDocument> of(Function<UpdateAction.Builder<TDocument, TPartialDocument>, ObjectBuilder<UpdateAction<TDocument, TPartialDocument>>> fn) -
detectNoop
If true, theresult
in the response is set to 'noop' when no changes to the document occur.API name:
detect_noop
-
doc
A partial update to an existing document.API name:
doc
-
docAsUpsert
Set totrue
to use the contents ofdoc
as the value ofupsert
.API name:
doc_as_upsert
-
script
The script to run to update the document.API name:
script
-
scriptedUpsert
Set totrue
to run the script whether or not the document exists.API name:
scripted_upsert
-
source
Iffalse
, source retrieval is turned off. You can also specify a comma-separated list of the fields you want to retrieve.API name:
_source
-
upsert
If the document does not already exist, the contents ofupsert
are inserted as a new document. If the document exists, thescript
is run.API name:
upsert
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
-
createUpdateActionDeserializer
public static <TDocument,TPartialDocument> JsonpDeserializer<UpdateAction<TDocument,TPartialDocument>> createUpdateActionDeserializer(JsonpDeserializer<TDocument> tDocumentDeserializer, JsonpDeserializer<TPartialDocument> tPartialDocumentDeserializer) Create a JSON deserializer for UpdateAction -
setupUpdateActionDeserializer
protected static <TDocument,TPartialDocument> void setupUpdateActionDeserializer(ObjectDeserializer<UpdateAction.Builder<TDocument, TPartialDocument>> op, JsonpDeserializer<TDocument> tDocumentDeserializer, JsonpDeserializer<TPartialDocument> tPartialDocumentDeserializer)
-