Package | Description |
---|---|
org.elasticsearch.action.bulk | |
org.elasticsearch.action.update | |
org.elasticsearch.client |
The client module allowing to easily perform actions/operations.
|
org.elasticsearch.client.support |
Modifier and Type | Method and Description |
---|---|
BulkRequest |
BulkRequest.add(UpdateRequest request)
Adds an
UpdateRequest to the list of actions to execute. |
BulkRequestBuilder |
BulkRequestBuilder.add(UpdateRequest request)
Adds an
UpdateRequest to the list of actions to execute. |
BulkRequest |
BulkRequest.add(UpdateRequest request,
Object payload) |
Modifier and Type | Method and Description |
---|---|
UpdateRequest |
UpdateRequest.addScriptParam(String name,
Object value)
Deprecated.
Use
script(Script) instead |
UpdateRequest |
UpdateRequest.consistencyLevel(WriteConsistencyLevel consistencyLevel)
Sets the consistency level of write.
|
UpdateRequest |
UpdateRequest.detectNoop(boolean detectNoop)
Should this update attempt to detect if it is a noop? Defaults to true.
|
UpdateRequest |
UpdateRequest.doc(byte[] source)
Sets the doc to use for updates when a script is not specified.
|
UpdateRequest |
UpdateRequest.doc(byte[] source,
int offset,
int length)
Sets the doc to use for updates when a script is not specified.
|
UpdateRequest |
UpdateRequest.doc(IndexRequest doc)
Sets the doc to use for updates when a script is not specified.
|
UpdateRequest |
UpdateRequest.doc(Map source)
Sets the doc to use for updates when a script is not specified.
|
UpdateRequest |
UpdateRequest.doc(Map source,
XContentType contentType)
Sets the doc to use for updates when a script is not specified.
|
UpdateRequest |
UpdateRequest.doc(Object... source)
Sets the doc to use for updates when a script is not specified, the doc provided
is a field and value pairs.
|
UpdateRequest |
UpdateRequest.doc(String source)
Sets the doc to use for updates when a script is not specified.
|
UpdateRequest |
UpdateRequest.doc(String field,
Object value)
Sets the doc to use for updates when a script is not specified.
|
UpdateRequest |
UpdateRequest.doc(XContentBuilder source)
Sets the doc to use for updates when a script is not specified.
|
UpdateRequest |
UpdateRequest.docAsUpsert(boolean shouldUpsertDoc) |
UpdateRequest |
UpdateRequest.fields(String... fields)
Explicitly specify the fields that will be returned.
|
UpdateRequest |
UpdateRequest.id(String id)
Sets the id of the indexed document.
|
UpdateRequest |
UpdateRequest.parent(String parent)
The parent id is used for the upsert request and also implicitely sets the routing if not already set.
|
UpdateRequest |
UpdateRequest.refresh(boolean refresh)
Should a refresh be executed post this update operation causing the operation to
be searchable.
|
UpdateRequest |
UpdateRequest.retryOnConflict(int retryOnConflict)
Sets the number of retries of a version conflict occurs because the document was updated between
getting it and updating it.
|
UpdateRequest |
UpdateRequest.routing(String routing)
Controls the shard routing of the request.
|
UpdateRequest |
UpdateRequest.script(Script script)
The script to execute.
|
UpdateRequest |
UpdateRequest.script(String script)
Deprecated.
Use
script(Script) instead |
UpdateRequest |
UpdateRequest.script(String script,
ScriptService.ScriptType scriptType)
Deprecated.
Use
script(Script) instead |
UpdateRequest |
UpdateRequest.script(String script,
ScriptService.ScriptType scriptType,
Map<String,Object> scriptParams)
Deprecated.
Use
script(Script) instead |
UpdateRequest |
UpdateRequest.script(String script,
String scriptLang,
ScriptService.ScriptType scriptType,
Map<String,Object> scriptParams)
Deprecated.
Use
script(Script) instead |
UpdateRequest |
UpdateRequest.scriptedUpsert(boolean scriptedUpsert) |
UpdateRequest |
UpdateRequest.scriptLang(String scriptLang)
Deprecated.
Use
script(Script) instead |
UpdateRequest |
UpdateRequest.scriptParams(Map<String,Object> scriptParams)
Deprecated.
Use
script(Script) instead |
UpdateRequest |
UpdateRequest.source(byte[] source) |
UpdateRequest |
UpdateRequest.source(byte[] source,
int offset,
int length) |
UpdateRequest |
UpdateRequest.source(BytesReference source) |
UpdateRequest |
UpdateRequest.source(XContentBuilder source) |
UpdateRequest |
UpdateRequest.type(String type)
Sets the type of the indexed document.
|
UpdateRequest |
UpdateRequest.upsert(byte[] source)
Sets the doc source of the update request to be used when the document does not exists.
|
UpdateRequest |
UpdateRequest.upsert(byte[] source,
int offset,
int length)
Sets the doc source of the update request to be used when the document does not exists.
|
UpdateRequest |
UpdateRequest.upsert(IndexRequest upsertRequest)
Sets the index request to be used if the document does not exists.
|
UpdateRequest |
UpdateRequest.upsert(Map source)
Sets the doc source of the update request to be used when the document does not exists.
|
UpdateRequest |
UpdateRequest.upsert(Map source,
XContentType contentType)
Sets the doc source of the update request to be used when the document does not exists.
|
UpdateRequest |
UpdateRequest.upsert(Object... source)
Sets the doc source of the update request to be used when the document does not exists.
|
UpdateRequest |
UpdateRequest.upsert(String source)
Sets the doc source of the update request to be used when the document does not exists.
|
UpdateRequest |
UpdateRequest.upsert(XContentBuilder source)
Sets the doc source of the update request to be used when the document does not exists.
|
UpdateRequest |
UpdateRequest.version(long version)
Sets the version, which will cause the index operation to only be performed if a matching
version exists and no changes happened on the doc since then.
|
UpdateRequest |
UpdateRequest.versionType(VersionType versionType)
Sets the versioning type.
|
Modifier and Type | Method and Description |
---|---|
protected void |
TransportUpdateAction.doExecute(UpdateRequest request,
ActionListener<UpdateResponse> listener) |
GetResult |
UpdateHelper.extractGetResult(UpdateRequest request,
String concreteIndex,
long version,
Map<String,Object> source,
XContentType sourceContentType,
BytesReference sourceAsBytes)
Extracts the fields from the updated document to be returned in a update response
|
protected UpdateHelper.Result |
UpdateHelper.prepare(UpdateRequest request,
GetResult getResult)
Prepares an update request by converting it into an index or delete request or an update response (no action).
|
UpdateHelper.Result |
UpdateHelper.prepare(UpdateRequest request,
IndexShard indexShard)
Prepares an update request by converting it into an index or delete request or an update response (no action).
|
static void |
TransportUpdateAction.resolveAndValidateRouting(MetaData metaData,
String concreteIndex,
UpdateRequest request) |
protected void |
TransportUpdateAction.resolveRequest(ClusterState state,
UpdateRequest request) |
protected void |
TransportUpdateAction.shardOperation(UpdateRequest request,
ActionListener<UpdateResponse> listener) |
protected void |
TransportUpdateAction.shardOperation(UpdateRequest request,
ActionListener<UpdateResponse> listener,
int retryCount) |
protected ShardIterator |
TransportUpdateAction.shards(ClusterState clusterState,
UpdateRequest request) |
Modifier and Type | Method and Description |
---|---|
ActionFuture<UpdateResponse> |
Client.update(UpdateRequest request)
Updates a document based on a script.
|
void |
Client.update(UpdateRequest request,
ActionListener<UpdateResponse> listener)
Updates a document based on a script.
|
Modifier and Type | Method and Description |
---|---|
ActionFuture<UpdateResponse> |
AbstractClient.update(UpdateRequest request) |
void |
AbstractClient.update(UpdateRequest request,
ActionListener<UpdateResponse> listener) |
Copyright © 2009–2016. All rights reserved.