Package org.nuxeo.elasticsearch.client
Class ESTransportClient
java.lang.Object
org.nuxeo.elasticsearch.client.ESTransportClient
- All Implemented Interfaces:
AutoCloseable
,ESClient
- Since:
- 9.3
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
aliasExists
(String aliasName) org.opensearch.action.bulk.BulkResponse
bulk
(org.opensearch.action.bulk.BulkRequest request) org.opensearch.action.bulk.BulkProcessor.Builder
bulkProcessorBuilder
(org.opensearch.action.bulk.BulkProcessor.Listener listener) Creates an elasticsearch BulkProcessor builder.org.opensearch.action.search.ClearScrollResponse
clearScroll
(org.opensearch.action.search.ClearScrollRequest request) void
close()
void
createIndex
(String indexName, String jsonSettings) void
createMapping
(String indexName, String type, String jsonMapping) org.opensearch.action.delete.DeleteResponse
delete
(org.opensearch.action.delete.DeleteRequest request) void
deleteIndex
(String indexName, int timeoutSecond) void
org.opensearch.action.get.GetResponse
get
(org.opensearch.action.get.GetRequest request) getFirstIndexForAlias
(String aliasName) Returns the name of the index referenced by the alias.org.opensearch.cluster.health.ClusterHealthStatus
getHealthStatus
(String[] indexNames) getMapping
(String indexName) Returns the mapping from elastic, exposed for testing purposesorg.opensearch.action.index.IndexResponse
index
(org.opensearch.action.index.IndexRequest request) Performs the indexing request.boolean
indexExists
(String indexName) boolean
mappingExists
(String indexName, String type) void
void
org.opensearch.action.search.SearchResponse
search
(org.opensearch.action.search.SearchRequest request) org.opensearch.action.search.SearchResponse
searchScroll
(org.opensearch.action.search.SearchScrollRequest request) void
updateAlias
(String aliasName, String indexName) boolean
waitForYellowStatus
(String[] indexNames, int timeoutSecond)
-
Field Details
-
client
protected org.opensearch.client.Client client
-
-
Constructor Details
-
ESTransportClient
public ESTransportClient(org.opensearch.client.Client client)
-
-
Method Details
-
waitForYellowStatus
- Specified by:
waitForYellowStatus
in interfaceESClient
-
getHealthStatus
- Specified by:
getHealthStatus
in interfaceESClient
-
refresh
-
flush
-
optimize
-
indexExists
- Specified by:
indexExists
in interfaceESClient
-
mappingExists
- Specified by:
mappingExists
in interfaceESClient
-
deleteIndex
- Specified by:
deleteIndex
in interfaceESClient
-
createIndex
- Specified by:
createIndex
in interfaceESClient
-
createMapping
- Specified by:
createMapping
in interfaceESClient
-
getMapping
Description copied from interface:ESClient
Returns the mapping from elastic, exposed for testing purposes- Specified by:
getMapping
in interfaceESClient
-
getNodesInfo
- Specified by:
getNodesInfo
in interfaceESClient
-
getNodesStats
- Specified by:
getNodesStats
in interfaceESClient
-
aliasExists
- Specified by:
aliasExists
in interfaceESClient
-
getFirstIndexForAlias
Description copied from interface:ESClient
Returns the name of the index referenced by the alias. Returns null if the alias does not exists.- Specified by:
getFirstIndexForAlias
in interfaceESClient
-
updateAlias
- Specified by:
updateAlias
in interfaceESClient
-
bulk
public org.opensearch.action.bulk.BulkResponse bulk(org.opensearch.action.bulk.BulkRequest request) -
delete
public org.opensearch.action.delete.DeleteResponse delete(org.opensearch.action.delete.DeleteRequest request) -
search
public org.opensearch.action.search.SearchResponse search(org.opensearch.action.search.SearchRequest request) -
searchScroll
public org.opensearch.action.search.SearchResponse searchScroll(org.opensearch.action.search.SearchScrollRequest request) - Specified by:
searchScroll
in interfaceESClient
-
get
public org.opensearch.action.get.GetResponse get(org.opensearch.action.get.GetRequest request) -
index
public org.opensearch.action.index.IndexResponse index(org.opensearch.action.index.IndexRequest request) Description copied from interface:ESClient
Performs the indexing request. -
clearScroll
public org.opensearch.action.search.ClearScrollResponse clearScroll(org.opensearch.action.search.ClearScrollRequest request) - Specified by:
clearScroll
in interfaceESClient
-
bulkProcessorBuilder
public org.opensearch.action.bulk.BulkProcessor.Builder bulkProcessorBuilder(org.opensearch.action.bulk.BulkProcessor.Listener listener) Description copied from interface:ESClient
Creates an elasticsearch BulkProcessor builder.- Specified by:
bulkProcessorBuilder
in interfaceESClient
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-