public class ElasticIndexingClient extends ElasticClient
| Modifier and Type | Field and Description |
|---|---|
static String |
EMPTY_JSON |
client, urlClient| Constructor and Description |
|---|
ElasticIndexingClient(ElasticIndexingAuditTrail auditTrail) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.http.conn.HttpClientConnectionManager |
getClientConnectionManager() |
protected String |
getEsPasswordProperty() |
protected String |
getEsUsernameProperty() |
long |
sendCountIndexObjectsRequest(String index)
Send request to ES to count all documents found in index
|
void |
sendCreateAttachmentPipelineRequest(String index,
String type,
String pipelineName,
String processorMappings)
Send request to ES to create a new Ingest pipeline for attachment
|
void |
sendCreateDocOnPipeline(String index,
String type,
String id,
String pipelineName,
String pipelineRequestOperation)
Send request to ES to create a new Ingest pipeline for attachment
|
void |
sendCreateIndexAliasRequest(String index,
String oldIndex,
String indexAlias)
Send request to ES to create a new index alias for new ES Index and remove it from old index if exists
|
boolean |
sendCreateIndexRequest(String index,
String settings)
Send request to ES to create a new index
|
void |
sendCreateTypeRequest(String index,
String type,
String mappings)
Send request to ES to create a new type
|
void |
sendCUDRequest(String bulkRequest)
Send request to ES to perform a C-reate, U-pdate or D-elete operation on a
ES document
|
void |
sendDeleteAllDocsOfTypeRequest(String index,
String type)
Send request to ES to delete all documents of the given type
|
void |
sendDeleteIndexRequest(String index)
Deletes an index from ES
|
String |
sendGetESVersion()
Send request to ES to get version
|
Set<String> |
sendGetIndexAliasesRequest(String index)
Send request to ES to get index aliases
|
boolean |
sendIsIndexExistsRequest(String index)
Send request to ES to test if index exists
|
boolean |
sendIsTypeExistsRequest(String index,
String type)
Send request to ES to get type existence information
|
void |
sendReindexTypeRequest(String index,
String oldIndex,
String type,
String pipeline)
This operation reindex the documents from old index/type to new index/type mapping.
|
sendHttpDeleteRequest, sendHttpGetRequest, sendHttpHeadRequest, sendHttpPostRequest, sendHttpPutRequestpublic static final String EMPTY_JSON
public ElasticIndexingClient(ElasticIndexingAuditTrail auditTrail)
public boolean sendCreateIndexRequest(String index, String settings)
public void sendCreateTypeRequest(String index, String type, String mappings)
public void sendDeleteAllDocsOfTypeRequest(String index, String type)
public void sendCUDRequest(String bulkRequest)
bulkRequest - JSON containing C-reate, U-pdate or D-elete operationpublic void sendCreateAttachmentPipelineRequest(String index, String type, String pipelineName, String processorMappings)
index - type - pipelineName - processorMappings - public void sendCreateDocOnPipeline(String index, String type, String id, String pipelineName, String pipelineRequestOperation)
index - type - id - pipelineName - pipelineRequestOperation - public void sendCreateIndexAliasRequest(String index, String oldIndex, String indexAlias)
public boolean sendIsTypeExistsRequest(String index, String type)
public Set<String> sendGetIndexAliasesRequest(String index)
public long sendCountIndexObjectsRequest(String index)
public String sendGetESVersion()
public void sendDeleteIndexRequest(String index)
index - index name to deletepublic void sendReindexTypeRequest(String index, String oldIndex, String type, String pipeline)
index - target index nameoldIndex - source index nametype - source type namepipeline - target pipeline name (optional)public boolean sendIsIndexExistsRequest(String index)
index - ES indexprotected String getEsUsernameProperty()
getEsUsernameProperty in class ElasticClientprotected String getEsPasswordProperty()
getEsPasswordProperty in class ElasticClientprotected org.apache.http.conn.HttpClientConnectionManager getClientConnectionManager()
getClientConnectionManager in class ElasticClientCopyright © 2003–2020 eXo Platform SAS. All rights reserved.