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 java.lang.Object implements JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UpdateAction.Builder<TDocument,TPartialDocument>
Builder forUpdateAction
. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<UpdateAction<java.lang.Object,java.lang.Object>>
_DESERIALIZER
Json deserializer forUpdateAction
based on named deserializers provided by the callingJsonMapper
. -
Method Summary
Modifier and Type Method Description static <TDocument, TPartialDocument>
JsonpDeserializer<UpdateAction<TDocument,TPartialDocument>>createUpdateActionDeserializer(JsonpDeserializer<TDocument> tDocumentDeserializer, JsonpDeserializer<TPartialDocument> tPartialDocumentDeserializer)
Create a JSON deserializer for UpdateActionjava.lang.Boolean
detectNoop()
Set to false to disable setting 'result' in the response to 'noop' if no change to the document occurred.TPartialDocument
doc()
A partial update to an existing document.java.lang.Boolean
docAsUpsert()
Set to true to use the contents of 'doc' as the value of 'upsert'static <TDocument, TPartialDocument>
UpdateAction<TDocument,TPartialDocument>of(java.util.function.Function<UpdateAction.Builder<TDocument,TPartialDocument>,ObjectBuilder<UpdateAction<TDocument,TPartialDocument>>> fn)
Script
script()
Script to execute to update the document.java.lang.Boolean
scriptedUpsert()
Set to true to execute 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)
SourceConfig
source()
Set to false to disable source retrieval.java.lang.String
toString()
TDocument
upsert()
If the document does not already exist, the contents of 'upsert' are inserted as a new document.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
_DESERIALIZER
public static final JsonpDeserializer<UpdateAction<java.lang.Object,java.lang.Object>> _DESERIALIZERJson deserializer forUpdateAction
based on named deserializers provided by the callingJsonMapper
.
-
-
Method Details
-
of
public static <TDocument, TPartialDocument> UpdateAction<TDocument,TPartialDocument> of(java.util.function.Function<UpdateAction.Builder<TDocument,TPartialDocument>,ObjectBuilder<UpdateAction<TDocument,TPartialDocument>>> fn) -
detectNoop
@Nullable public final java.lang.Boolean detectNoop()Set to false to disable setting 'result' in the response to 'noop' if no change to the document occurred.API name:
detect_noop
-
doc
A partial update to an existing document.API name:
doc
-
docAsUpsert
@Nullable public final java.lang.Boolean docAsUpsert()Set to true to use the contents of 'doc' as the value of 'upsert'API name:
doc_as_upsert
-
script
Script to execute to update the document.API name:
script
-
scriptedUpsert
@Nullable public final java.lang.Boolean scriptedUpsert()Set to true to execute the script whether or not the document exists.API name:
scripted_upsert
-
source
Set to false to disable source retrieval. 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 of 'upsert' are inserted as a new document. If the document exists, the 'script' is executed.API name:
upsert
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
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)
-