|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.action.support.BaseRequestBuilder<UpdateRequest,UpdateResponse> org.elasticsearch.action.update.UpdateRequestBuilder
public class UpdateRequestBuilder
Field Summary |
---|
Fields inherited from class org.elasticsearch.action.support.BaseRequestBuilder |
---|
client, request |
Constructor Summary | |
---|---|
UpdateRequestBuilder(Client client)
|
|
UpdateRequestBuilder(Client client,
String index,
String type,
String id)
|
Method Summary | |
---|---|
UpdateRequestBuilder |
addScriptParam(String name,
Object value)
Add a script parameter. |
protected void |
doExecute(ActionListener<UpdateResponse> listener)
|
UpdateRequestBuilder |
setConsistencyLevel(WriteConsistencyLevel consistencyLevel)
Sets the consistency level of write. |
UpdateRequestBuilder |
setDoc(byte[] source)
Sets the doc to use for updates when a script is not specified. |
UpdateRequestBuilder |
setDoc(byte[] source,
int offset,
int length)
Sets the doc to use for updates when a script is not specified. |
UpdateRequestBuilder |
setDoc(IndexRequest indexRequest)
Sets the doc to use for updates when a script is not specified. |
UpdateRequestBuilder |
setDoc(Map source)
Sets the doc to use for updates when a script is not specified. |
UpdateRequestBuilder |
setDoc(Map source,
XContentType contentType)
Sets the doc to use for updates when a script is not specified. |
UpdateRequestBuilder |
setDoc(String source)
Sets the doc to use for updates when a script is not specified. |
UpdateRequestBuilder |
setDoc(XContentBuilder source)
Sets the doc to use for updates when a script is not specified. |
UpdateRequestBuilder |
setFields(String... fields)
Explicitly specify the fields that will be returned. |
UpdateRequestBuilder |
setId(String id)
Sets the id of the indexed document. |
UpdateRequestBuilder |
setIndex(String index)
Sets the index the document will exists on. |
UpdateRequestBuilder |
setParent(String parent)
|
UpdateRequestBuilder |
setPercolate(String percolate)
Causes the updated document to be percolated. |
UpdateRequestBuilder |
setRefresh(boolean refresh)
Should a refresh be executed post this update operation causing the operation to be searchable. |
UpdateRequestBuilder |
setReplicationType(ReplicationType replicationType)
Sets the replication type. |
UpdateRequestBuilder |
setRetryOnConflict(int retryOnConflict)
Sets the number of retries of a version conflict occurs because the document was updated between getting it and updating it. |
UpdateRequestBuilder |
setRouting(String routing)
Controls the shard routing of the request. |
UpdateRequestBuilder |
setScript(String script)
The script to execute. |
UpdateRequestBuilder |
setScriptLang(String scriptLang)
The language of the script to execute. |
UpdateRequestBuilder |
setScriptParams(Map<String,Object> scriptParams)
Sets the script parameters to use with the script. |
UpdateRequestBuilder |
setSource(byte[] source)
|
UpdateRequestBuilder |
setSource(byte[] source,
int offset,
int length)
|
UpdateRequestBuilder |
setSource(BytesReference source)
|
UpdateRequestBuilder |
setSource(XContentBuilder source)
|
UpdateRequestBuilder |
setTimeout(String timeout)
A timeout to wait if the index operation can't be performed immediately. |
UpdateRequestBuilder |
setTimeout(TimeValue timeout)
A timeout to wait if the index operation can't be performed immediately. |
UpdateRequestBuilder |
setType(String type)
Sets the type of the indexed document. |
UpdateRequestBuilder |
setUpsert(byte[] source)
Sets the doc source of the update request to be used when the document does not exists. |
UpdateRequestBuilder |
setUpsert(byte[] source,
int offset,
int length)
Sets the doc source of the update request to be used when the document does not exists. |
UpdateRequestBuilder |
setUpsert(IndexRequest indexRequest)
Sets the index request to be used if the document does not exists. |
UpdateRequestBuilder |
setUpsert(Map source)
Sets the doc source of the update request to be used when the document does not exists. |
UpdateRequestBuilder |
setUpsert(Map source,
XContentType contentType)
Sets the doc source of the update request to be used when the document does not exists. |
UpdateRequestBuilder |
setUpsert(String source)
Sets the doc source of the update request to be used when the document does not exists. |
UpdateRequestBuilder |
setUpsert(XContentBuilder source)
Sets the doc source of the update request to be used when the document does not exists. |
Methods inherited from class org.elasticsearch.action.support.BaseRequestBuilder |
---|
execute, execute, request |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UpdateRequestBuilder(Client client)
public UpdateRequestBuilder(Client client, String index, String type, String id)
Method Detail |
---|
public UpdateRequestBuilder setIndex(String index)
public UpdateRequestBuilder setType(String type)
public UpdateRequestBuilder setId(String id)
public UpdateRequestBuilder setRouting(String routing)
public UpdateRequestBuilder setParent(String parent)
public UpdateRequestBuilder setScript(String script)
public UpdateRequestBuilder setScriptLang(String scriptLang)
public UpdateRequestBuilder setScriptParams(Map<String,Object> scriptParams)
public UpdateRequestBuilder addScriptParam(String name, Object value)
public UpdateRequestBuilder setFields(String... fields)
public UpdateRequestBuilder setRetryOnConflict(int retryOnConflict)
public UpdateRequestBuilder setTimeout(TimeValue timeout)
public UpdateRequestBuilder setTimeout(String timeout)
public UpdateRequestBuilder setRefresh(boolean refresh)
public UpdateRequestBuilder setReplicationType(ReplicationType replicationType)
public UpdateRequestBuilder setConsistencyLevel(WriteConsistencyLevel consistencyLevel)
WriteConsistencyLevel.DEFAULT
public UpdateRequestBuilder setPercolate(String percolate)
public UpdateRequestBuilder setDoc(IndexRequest indexRequest)
public UpdateRequestBuilder setDoc(XContentBuilder source)
public UpdateRequestBuilder setDoc(Map source)
public UpdateRequestBuilder setDoc(Map source, XContentType contentType)
public UpdateRequestBuilder setDoc(String source)
public UpdateRequestBuilder setDoc(byte[] source)
public UpdateRequestBuilder setDoc(byte[] source, int offset, int length)
public UpdateRequestBuilder setUpsert(IndexRequest indexRequest)
DocumentMissingException
is thrown.
public UpdateRequestBuilder setUpsert(XContentBuilder source)
public UpdateRequestBuilder setUpsert(Map source)
public UpdateRequestBuilder setUpsert(Map source, XContentType contentType)
public UpdateRequestBuilder setUpsert(String source)
public UpdateRequestBuilder setUpsert(byte[] source)
public UpdateRequestBuilder setUpsert(byte[] source, int offset, int length)
public UpdateRequestBuilder setSource(XContentBuilder source) throws Exception
Exception
public UpdateRequestBuilder setSource(byte[] source) throws Exception
Exception
public UpdateRequestBuilder setSource(byte[] source, int offset, int length) throws Exception
Exception
public UpdateRequestBuilder setSource(BytesReference source) throws Exception
Exception
protected void doExecute(ActionListener<UpdateResponse> listener)
doExecute
in class BaseRequestBuilder<UpdateRequest,UpdateResponse>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |