Modifier and Type | Field and Description |
---|---|
protected List<BulkIndexRequestInterceptor> |
bulkIndexRequestInterceptors |
protected BulkRequest |
bulkRequest |
protected CommandContext |
commandContext |
protected ElasticsearchCompatibility |
elasticsearchCompatibility |
protected com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
protected Map<String,Set<String>> |
registeredFullIndexes |
protected org.elasticsearch.client.RestHighLevelClient |
restClient |
Constructor and Description |
---|
BulkIndexingSession(CommandContext commandContext,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
org.elasticsearch.client.RestHighLevelClient restClient,
ElasticsearchCompatibility elasticsearchCompatibility,
List<BulkIndexRequestInterceptor> bulkIndexRequestInterceptors) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
ensureBulkRequestInitialized() |
org.elasticsearch.action.bulk.BulkResponse |
executeBulkRequest() |
void |
flush() |
BulkRequest |
getBulkRequest() |
void |
indexData(String index,
String id,
com.fasterxml.jackson.databind.node.ObjectNode objectNode) |
void |
indexDataWithExternalVersion(String index,
String id,
com.fasterxml.jackson.databind.node.ObjectNode objectNode,
long version) |
boolean |
isFullIndexRegistered(String type,
String id) |
protected <Resp> Resp |
parseEntity(org.apache.http.HttpEntity entity,
org.elasticsearch.common.CheckedFunction<org.elasticsearch.common.xcontent.XContentParser,Resp,IOException> entityParser) |
void |
registerFullIndex(String type,
String id) |
void |
retryFailedBulkRequest(com.fasterxml.jackson.databind.node.ObjectNode actionNode,
com.fasterxml.jackson.databind.node.ObjectNode sourceNode) |
void |
upsertData(String index,
String id,
com.fasterxml.jackson.databind.node.ObjectNode objectNode) |
void |
upsertDataWithScript(String index,
String id,
com.fasterxml.jackson.databind.node.ObjectNode upsertDocNode,
com.fasterxml.jackson.databind.node.ObjectNode scriptNode) |
protected CommandContext commandContext
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
protected org.elasticsearch.client.RestHighLevelClient restClient
protected ElasticsearchCompatibility elasticsearchCompatibility
protected List<BulkIndexRequestInterceptor> bulkIndexRequestInterceptors
protected BulkRequest bulkRequest
public BulkIndexingSession(CommandContext commandContext, com.fasterxml.jackson.databind.ObjectMapper objectMapper, org.elasticsearch.client.RestHighLevelClient restClient, ElasticsearchCompatibility elasticsearchCompatibility, List<BulkIndexRequestInterceptor> bulkIndexRequestInterceptors)
public void upsertData(String index, String id, com.fasterxml.jackson.databind.node.ObjectNode objectNode)
public void upsertDataWithScript(String index, String id, com.fasterxml.jackson.databind.node.ObjectNode upsertDocNode, com.fasterxml.jackson.databind.node.ObjectNode scriptNode)
public void indexData(String index, String id, com.fasterxml.jackson.databind.node.ObjectNode objectNode)
public void indexDataWithExternalVersion(String index, String id, com.fasterxml.jackson.databind.node.ObjectNode objectNode, long version)
public void retryFailedBulkRequest(com.fasterxml.jackson.databind.node.ObjectNode actionNode, com.fasterxml.jackson.databind.node.ObjectNode sourceNode)
public org.elasticsearch.action.bulk.BulkResponse executeBulkRequest() throws IOException
IOException
protected <Resp> Resp parseEntity(org.apache.http.HttpEntity entity, org.elasticsearch.common.CheckedFunction<org.elasticsearch.common.xcontent.XContentParser,Resp,IOException> entityParser) throws IOException
IOException
protected void ensureBulkRequestInitialized()
public BulkRequest getBulkRequest()