Package | Description |
---|---|
org.elasticsearch.action.bulk | |
org.elasticsearch.action.index |
Index action.
|
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 |
---|---|
BulkProcessor |
BulkProcessor.add(IndexRequest request)
Adds an
IndexRequest to the list of actions to execute. |
BulkRequest |
BulkRequest.add(IndexRequest request)
Adds an
IndexRequest to the list of actions to execute. |
BulkRequestBuilder |
BulkRequestBuilder.add(IndexRequest request)
Adds an
IndexRequest to the list of actions to execute. |
BulkRequest |
BulkRequest.add(IndexRequest request,
Object payload) |
Modifier and Type | Method and Description |
---|---|
IndexRequest |
IndexRequest.contentType(XContentType contentType)
Sets the content type that will be used when generating a document from user provided objects (like Map).
|
IndexRequest |
IndexRequest.create(boolean create)
Set to true to force this index to use
IndexRequest.OpType.CREATE . |
IndexRequest |
IndexRequest.id(String id)
Sets the id of the indexed document.
|
IndexRequest |
IndexRequest.opType(IndexRequest.OpType opType)
Sets the type of operation to perform.
|
IndexRequest |
IndexRequest.opType(String opType)
Sets a string representation of the
opType(org.elasticsearch.action.index.IndexRequest.OpType) . |
IndexRequest |
IndexRequest.parent(String parent)
Sets the parent id of this document.
|
IndexRequest |
IndexRequest.refresh(boolean refresh)
Should a refresh be executed post this index operation causing the operation to
be searchable.
|
IndexRequest |
IndexRequest.routing(String routing)
Controls the shard routing of the request.
|
IndexRequest |
IndexRequest.source(byte[] source)
Sets the document to index in bytes form.
|
IndexRequest |
IndexRequest.source(byte[] source,
int offset,
int length)
Sets the document to index in bytes form (assumed to be safe to be used from different
threads).
|
IndexRequest |
IndexRequest.source(BytesReference source)
Sets the document to index in bytes form.
|
IndexRequest |
IndexRequest.source(Map source)
Index the Map as a
Requests.INDEX_CONTENT_TYPE . |
IndexRequest |
IndexRequest.source(Map source,
XContentType contentType)
Index the Map as the provided content type.
|
IndexRequest |
IndexRequest.source(Object... source) |
IndexRequest |
IndexRequest.source(String source)
Sets the document source to index.
|
IndexRequest |
IndexRequest.source(String field1,
Object value1) |
IndexRequest |
IndexRequest.source(String field1,
Object value1,
String field2,
Object value2) |
IndexRequest |
IndexRequest.source(String field1,
Object value1,
String field2,
Object value2,
String field3,
Object value3) |
IndexRequest |
IndexRequest.source(String field1,
Object value1,
String field2,
Object value2,
String field3,
Object value3,
String field4,
Object value4) |
IndexRequest |
IndexRequest.source(XContentBuilder sourceBuilder)
Sets the content source to index.
|
IndexRequest |
IndexRequest.timestamp(String timestamp)
Sets the timestamp either as millis since the epoch, or, in the configured date format.
|
IndexRequest |
IndexRequest.ttl(long ttl)
Sets the relative ttl value in milliseconds.
|
IndexRequest |
IndexRequest.ttl(String ttl) |
IndexRequest |
IndexRequest.ttl(TimeValue ttl) |
IndexRequest |
IndexRequest.type(String type)
Sets the type of the indexed document.
|
IndexRequest |
IndexRequest.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.
|
IndexRequest |
IndexRequest.versionType(VersionType versionType)
Sets the versioning type.
|
Modifier and Type | Method and Description |
---|---|
protected Tuple<IndexResponse,IndexRequest> |
TransportIndexAction.shardOperationOnPrimary(MetaData metaData,
IndexRequest request) |
Modifier and Type | Method and Description |
---|---|
protected void |
TransportIndexAction.doExecute(Task task,
IndexRequest request,
ActionListener<IndexResponse> listener) |
static TransportReplicationAction.WriteResult<IndexResponse> |
TransportIndexAction.executeIndexRequestOnPrimary(BulkShardRequest shardRequest,
IndexRequest request,
IndexShard indexShard,
MappingUpdatedAction mappingUpdatedAction)
Execute the given
IndexRequest on a primary shard, throwing a
RetryOnPrimaryException if the operation needs to be re-tried. |
static Engine.IndexingOperation |
TransportIndexAction.executeIndexRequestOnReplica(IndexRequest request,
IndexShard indexShard)
Execute the given
IndexRequest on a replica shard, throwing a
RetryOnReplicaException if the operation needs to be re-tried. |
static Engine.IndexingOperation |
TransportIndexAction.prepareIndexOperationOnPrimary(BulkShardRequest shardRequest,
IndexRequest request,
IndexShard indexShard)
Utility method to create either an index or a create operation depending
on the
IndexRequest.OpType of the request. |
protected void |
TransportIndexAction.resolveRequest(MetaData metaData,
String concreteIndex,
IndexRequest request) |
protected Tuple<IndexResponse,IndexRequest> |
TransportIndexAction.shardOperationOnPrimary(MetaData metaData,
IndexRequest request) |
protected void |
TransportIndexAction.shardOperationOnReplica(IndexRequest request) |
Constructor and Description |
---|
IndexRequest(IndexRequest indexRequest,
ActionRequest originalRequest)
Copy constructor that creates a new index request that is a copy of the one provided as an argument.
|
Modifier and Type | Method and Description |
---|---|
IndexRequest |
UpdateRequest.doc() |
IndexRequest |
UpdateRequest.upsertRequest() |
Modifier and Type | Method and Description |
---|---|
UpdateRequest |
UpdateRequest.doc(IndexRequest doc)
Sets the doc to use for updates when a script is not specified.
|
UpdateRequestBuilder |
UpdateRequestBuilder.setDoc(IndexRequest indexRequest)
Sets the doc to use for updates when a script is not specified.
|
UpdateRequestBuilder |
UpdateRequestBuilder.setUpsert(IndexRequest indexRequest)
Sets the index request to be used if the document does not exists.
|
UpdateRequest |
UpdateRequest.upsert(IndexRequest upsertRequest)
Sets the index request to be used if the document does not exists.
|
Modifier and Type | Method and Description |
---|---|
static IndexRequest |
Requests.indexRequest() |
static IndexRequest |
Requests.indexRequest(String index)
Create an index request against a specific index.
|
Modifier and Type | Method and Description |
---|---|
ActionFuture<IndexResponse> |
Client.index(IndexRequest request)
Index a JSON source associated with a given index and type.
|
void |
Client.index(IndexRequest request,
ActionListener<IndexResponse> listener)
Index a document associated with a given index and type.
|
Modifier and Type | Method and Description |
---|---|
ActionFuture<IndexResponse> |
AbstractClient.index(IndexRequest request) |
void |
AbstractClient.index(IndexRequest request,
ActionListener<IndexResponse> listener) |
Copyright © 2009–2016. All rights reserved.