Class ElasticIndexingClient
java.lang.Object
org.exoplatform.commons.search.es.client.ElasticClient
org.exoplatform.commons.search.es.client.ElasticIndexingClient
-
Field Summary
FieldsFields inherited from class org.exoplatform.commons.search.es.client.ElasticClient
auditTrail, client, DEFAULT_MAX_HTTP_POOL_CONNECTIONS, urlClient -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.hc.client5.http.io.HttpClientConnectionManagerprotected Stringprotected Stringprotected intprotected voidlongSend request to ES to count all documents found in indexvoidsendCreateAttachmentPipelineRequest(String index, String pipelineName, String processorMappings) Send request to ES to create a new Ingest pipeline for attachmentvoidsendCreateDocOnPipeline(String index, String id, String pipelineName, String pipelineRequestOperation) Send request to ES to create a new Ingest pipeline for attachmentvoidsendCreateIndexAliasRequest(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 existsbooleansendCreateIndexRequest(String index, String settings, String mappings) Send request to ES to create a new indexvoidsendCUDRequest(String bulkRequest) Send request to ES to perform a C-reate, U-pdate or D-elete operation on a ES documentvoidsendDeleteAllDocsRequest(String index) Send request to ES to delete all documents of the given typevoidsendDeleteIndexRequest(String index) Deletes an index from ESSend request to ES to get versionsendGetIndexAliasesRequest(String index) Send request to ES to get index aliasesbooleansendIsIndexExistsRequest(String index) Send request to ES to test if index existsvoidsendReindexTypeRequest(String index, String oldIndex, String pipeline) This operation reindex the documents from old index/type to new index/type mapping.Methods inherited from class org.exoplatform.commons.search.es.client.ElasticClient
getHttpClient, initHttpClient, sendHttpDeleteRequest, sendHttpGetRequest, sendHttpHeadRequest, sendHttpPostRequest, sendHttpPutRequest
-
Field Details
-
EMPTY_JSON
- See Also:
-
-
Constructor Details
-
ElasticIndexingClient
-
-
Method Details
-
sendCreateIndexRequest
Send request to ES to create a new index -
sendCUDRequest
Send request to ES to perform a C-reate, U-pdate or D-elete operation on a ES document- Parameters:
bulkRequest- JSON containing C-reate, U-pdate or D-elete operation
-
sendDeleteAllDocsRequest
Send request to ES to delete all documents of the given type -
sendCreateAttachmentPipelineRequest
public void sendCreateAttachmentPipelineRequest(String index, String pipelineName, String processorMappings) Send request to ES to create a new Ingest pipeline for attachment- Parameters:
index-pipelineName-processorMappings-
-
sendCreateDocOnPipeline
public void sendCreateDocOnPipeline(String index, String id, String pipelineName, String pipelineRequestOperation) Send request to ES to create a new Ingest pipeline for attachment- Parameters:
index-id-pipelineName-pipelineRequestOperation-
-
sendCreateIndexAliasRequest
Send request to ES to create a new index alias for new ES Index and remove it from old index if exists -
sendGetIndexAliasesRequest
Send request to ES to get index aliases -
sendCountIndexObjectsRequest
Send request to ES to count all documents found in index -
sendGetESVersion
Send request to ES to get version -
sendDeleteIndexRequest
Deletes an index from ES- Parameters:
index- index name to delete
-
sendReindexTypeRequest
This operation reindex the documents from old index/type to new index/type mapping. A pipeline could be used when reindexing in case Ingest Attachment plugin is used by a target type.- Parameters:
index- target index nameoldIndex- source index name
-
sendIsIndexExistsRequest
Send request to ES to test if index exists- Parameters:
index- ES index- Returns:
- true if index exists in ES
-
getEsUsernameProperty
- Specified by:
getEsUsernamePropertyin classElasticClient
-
getEsPasswordProperty
- Specified by:
getEsPasswordPropertyin classElasticClient
-
getClientConnectionManager
protected org.apache.hc.client5.http.io.HttpClientConnectionManager getClientConnectionManager()- Specified by:
getClientConnectionManagerin classElasticClient
-
getMaxConnections
protected int getMaxConnections()- Overrides:
getMaxConnectionsin classElasticClient
-
resetMaxConnections
protected void resetMaxConnections()
-