Package org.elasticsearch.action
Interface DocWriteRequest<T>
-
- All Superinterfaces:
IndicesRequest
- All Known Implementing Classes:
DeleteRequest
,IndexRequest
,UpdateRequest
public interface DocWriteRequest<T> extends IndicesRequest
Generic interface to group ActionRequest, which perform writes to a single document Action requests implementing this can be part ofBulkRequest
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
DocWriteRequest.OpType
Requested operation type to perform on the document-
Nested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
IndicesRequest.Replaceable
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
id()
Get the id of the document for this requestjava.lang.String
index()
Get the index that this request operates onT
index(java.lang.String index)
Set the index for this requestIndicesOptions
indicesOptions()
Get the options for this requestDocWriteRequest.OpType
opType()
Get the requested document operation type of the requestjava.lang.String
parent()
Get the parent for this requeststatic DocWriteRequest
readDocumentRequest(StreamInput in)
read a document write (index/delete/update) requestjava.lang.String
routing()
Get the routing for this requestT
routing(java.lang.String routing)
Set the routing for this requestjava.lang.String
type()
Get the type that this request operates onT
type(java.lang.String type)
Set the type for this requestlong
version()
Get the document version for this requestT
version(long version)
Sets the version, which will perform the operation only if a matching version exists and no changes happened on the doc since then.VersionType
versionType()
Get the document version type for this requestT
versionType(VersionType versionType)
Sets the versioning type.static void
writeDocumentRequest(StreamOutput out, DocWriteRequest request)
write a document write (index/delete/update) request-
Methods inherited from interface org.elasticsearch.action.IndicesRequest
indices
-
-
-
-
Method Detail
-
index
T index(java.lang.String index)
Set the index for this request- Returns:
- the Request
-
index
java.lang.String index()
Get the index that this request operates on- Returns:
- the index
-
type
T type(java.lang.String type)
Set the type for this request- Returns:
- the Request
-
type
java.lang.String type()
Get the type that this request operates on- Returns:
- the type
-
id
java.lang.String id()
Get the id of the document for this request- Returns:
- the id
-
indicesOptions
IndicesOptions indicesOptions()
Get the options for this request- Specified by:
indicesOptions
in interfaceIndicesRequest
- Returns:
- the indices options
-
routing
T routing(java.lang.String routing)
Set the routing for this request- Returns:
- the Request
-
routing
java.lang.String routing()
Get the routing for this request- Returns:
- the Routing
-
parent
java.lang.String parent()
Get the parent for this request- Returns:
- the Parent
-
version
long version()
Get the document version for this request- Returns:
- the document version
-
version
T version(long version)
Sets the version, which will perform the operation only if a matching version exists and no changes happened on the doc since then.
-
versionType
VersionType versionType()
Get the document version type for this request- Returns:
- the document version type
-
versionType
T versionType(VersionType versionType)
Sets the versioning type. Defaults toVersionType.INTERNAL
.
-
opType
DocWriteRequest.OpType opType()
Get the requested document operation type of the request- Returns:
- the operation type
DocWriteRequest.OpType
-
readDocumentRequest
static DocWriteRequest readDocumentRequest(StreamInput in) throws java.io.IOException
read a document write (index/delete/update) request- Throws:
java.io.IOException
-
writeDocumentRequest
static void writeDocumentRequest(StreamOutput out, DocWriteRequest request) throws java.io.IOException
write a document write (index/delete/update) request- Throws:
java.io.IOException
-
-