|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.action.support.single.instance.InstanceShardOperationRequest org.elasticsearch.action.update.UpdateRequest
public class UpdateRequest
Field Summary |
---|
Fields inherited from class org.elasticsearch.action.support.single.instance.InstanceShardOperationRequest |
---|
DEFAULT_TIMEOUT, index, shardId, timeout |
Constructor Summary | |
---|---|
UpdateRequest(String index,
String type,
String id)
|
Method Summary | |
---|---|
UpdateRequest |
addScriptParam(String name,
Object value)
Add a script parameter. |
WriteConsistencyLevel |
consistencyLevel()
|
UpdateRequest |
consistencyLevel(WriteConsistencyLevel consistencyLevel)
Sets the consistency level of write. |
IndexRequest |
doc()
|
UpdateRequest |
doc(byte[] source)
Sets the doc to use for updates when a script is not specified. |
UpdateRequest |
doc(byte[] source,
int offset,
int length)
Sets the doc to use for updates when a script is not specified. |
UpdateRequest |
doc(IndexRequest doc)
Sets the doc to use for updates when a script is not specified. |
UpdateRequest |
doc(Map source)
Sets the doc to use for updates when a script is not specified. |
UpdateRequest |
doc(Map source,
XContentType contentType)
Sets the doc to use for updates when a script is not specified. |
UpdateRequest |
doc(String source)
Sets the doc to use for updates when a script is not specified. |
UpdateRequest |
doc(XContentBuilder source)
Sets the doc to use for updates when a script is not specified. |
String[] |
fields()
Get the fields to be returned. |
UpdateRequest |
fields(String... fields)
Explicitly specify the fields that will be returned. |
String |
id()
The id of the indexed document. |
UpdateRequest |
id(String id)
Sets the id of the indexed document. |
UpdateRequest |
index(String index)
Sets the index the document will exists on. |
UpdateRequest |
parent(String parent)
Sets the parent id of this document. |
String |
percolate()
|
UpdateRequest |
percolate(String percolate)
Causes the update request document to be percolated. |
void |
readFrom(StreamInput in)
|
boolean |
refresh()
|
UpdateRequest |
refresh(boolean refresh)
Should a refresh be executed post this update operation causing the operation to be searchable. |
ReplicationType |
replicationType()
The replication type. |
UpdateRequest |
replicationType(ReplicationType replicationType)
Sets the replication type. |
int |
retryOnConflict()
|
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. |
String |
routing()
Controls the shard routing of the request. |
UpdateRequest |
routing(String routing)
Controls the shard routing of the request. |
String |
script()
|
UpdateRequest |
script(String script)
The script to execute. |
UpdateRequest |
script(String script,
Map<String,Object> scriptParams)
The script to execute. |
UpdateRequest |
script(String script,
String scriptLang,
Map<String,Object> scriptParams)
The script to execute. |
UpdateRequest |
scriptLang(String scriptLang)
The language of the script to execute. |
Map<String,Object> |
scriptParams()
|
UpdateRequest |
scriptParams(Map<String,Object> scriptParams)
Sets the script parameters to use with the script. |
UpdateRequest |
source(byte[] source)
|
UpdateRequest |
source(byte[] source,
int offset,
int length)
|
UpdateRequest |
source(BytesReference source)
|
UpdateRequest |
source(XContentBuilder source)
|
UpdateRequest |
timeout(String timeout)
A timeout to wait if the index operation can't be performed immediately. |
UpdateRequest |
timeout(TimeValue timeout)
A timeout to wait if the index operation can't be performed immediately. |
String |
type()
The type of the indexed document. |
UpdateRequest |
type(String type)
Sets the type of the indexed document. |
UpdateRequest |
upsert(byte[] source)
Sets the doc source of the update request to be used when the document does not exists. |
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 |
upsert(IndexRequest upsertRequest)
Sets the index request to be used if the document does not exists. |
UpdateRequest |
upsert(Map source)
Sets the doc source of the update request to be used when the document does not exists. |
UpdateRequest |
upsert(Map source,
XContentType contentType)
Sets the doc source of the update request to be used when the document does not exists. |
UpdateRequest |
upsert(String source)
Sets the doc source of the update request to be used when the document does not exists. |
UpdateRequest |
upsert(XContentBuilder source)
Sets the doc source of the update request to be used when the document does not exists. |
IndexRequest |
upsertRequest()
|
ActionRequestValidationException |
validate()
|
void |
writeTo(StreamOutput out)
|
Methods inherited from class org.elasticsearch.action.support.single.instance.InstanceShardOperationRequest |
---|
beforeLocalFork, index, listenerThreaded, listenerThreaded, timeout |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UpdateRequest(String index, String type, String id)
Method Detail |
---|
public ActionRequestValidationException validate()
validate
in interface ActionRequest
validate
in class InstanceShardOperationRequest
public UpdateRequest index(String index)
public String type()
public UpdateRequest type(String type)
public String id()
public UpdateRequest id(String id)
public UpdateRequest routing(String routing)
public UpdateRequest parent(String parent)
public String routing()
public String script()
public Map<String,Object> scriptParams()
public UpdateRequest script(String script)
public UpdateRequest scriptLang(String scriptLang)
public UpdateRequest addScriptParam(String name, Object value)
public UpdateRequest scriptParams(Map<String,Object> scriptParams)
public UpdateRequest script(String script, @Nullable Map<String,Object> scriptParams)
public UpdateRequest script(String script, @Nullable String scriptLang, @Nullable Map<String,Object> scriptParams)
script
- The script to executescriptLang
- The script languagescriptParams
- The script parameterspublic UpdateRequest fields(String... fields)
public String[] fields()
public UpdateRequest retryOnConflict(int retryOnConflict)
public int retryOnConflict()
public UpdateRequest percolate(String percolate)
public String percolate()
public UpdateRequest timeout(TimeValue timeout)
public UpdateRequest timeout(String timeout)
public UpdateRequest refresh(boolean refresh)
public boolean refresh()
public ReplicationType replicationType()
public UpdateRequest replicationType(ReplicationType replicationType)
public WriteConsistencyLevel consistencyLevel()
public UpdateRequest consistencyLevel(WriteConsistencyLevel consistencyLevel)
WriteConsistencyLevel.DEFAULT
public UpdateRequest doc(IndexRequest doc)
public UpdateRequest doc(XContentBuilder source)
public UpdateRequest doc(Map source)
public UpdateRequest doc(Map source, XContentType contentType)
public UpdateRequest doc(String source)
public UpdateRequest doc(byte[] source)
public UpdateRequest doc(byte[] source, int offset, int length)
public IndexRequest doc()
public UpdateRequest upsert(IndexRequest upsertRequest)
DocumentMissingException
is thrown.
public UpdateRequest upsert(XContentBuilder source)
public UpdateRequest upsert(Map source)
public UpdateRequest upsert(Map source, XContentType contentType)
public UpdateRequest upsert(String source)
public UpdateRequest upsert(byte[] source)
public UpdateRequest upsert(byte[] source, int offset, int length)
public IndexRequest upsertRequest()
public UpdateRequest source(XContentBuilder source) throws Exception
Exception
public UpdateRequest source(byte[] source) throws Exception
Exception
public UpdateRequest source(byte[] source, int offset, int length) throws Exception
Exception
public UpdateRequest source(BytesReference source) throws Exception
Exception
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
readFrom
in class InstanceShardOperationRequest
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
writeTo
in class InstanceShardOperationRequest
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |