Package org.nuxeo.elasticsearch.api
Interface ESClient
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
ESRestClient
,ESTransportClient
public interface ESClient extends AutoCloseable
- Since:
- 9.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
aliasExists(String aliasName)
org.elasticsearch.action.bulk.BulkResponse
bulk(org.elasticsearch.action.bulk.BulkRequest request)
org.elasticsearch.action.bulk.BulkProcessor.Builder
bulkProcessorBuilder(org.elasticsearch.action.bulk.BulkProcessor.Listener listener)
Creates an elasticsearch BulkProcessor builder.org.elasticsearch.action.search.ClearScrollResponse
clearScroll(org.elasticsearch.action.search.ClearScrollRequest request)
void
createIndex(String indexName, String jsonSettings)
void
createMapping(String indexName, String type, String jsonMapping)
org.elasticsearch.action.delete.DeleteResponse
delete(org.elasticsearch.action.delete.DeleteRequest request)
void
deleteIndex(String indexName, int timeoutSecond)
void
flush(String indexName)
org.elasticsearch.action.get.GetResponse
get(org.elasticsearch.action.get.GetRequest request)
String
getFirstIndexForAlias(String aliasName)
Returns the name of the index referenced by the alias.org.elasticsearch.cluster.health.ClusterHealthStatus
getHealthStatus(String[] indexNames)
String
getMapping(String indexName)
Returns the mapping from elastic, exposed for testing purposesString
getNodesInfo()
String
getNodesStats()
org.elasticsearch.action.index.IndexResponse
index(org.elasticsearch.action.index.IndexRequest request)
Performs the indexing request.boolean
indexExists(String indexName)
boolean
mappingExists(String indexName, String type)
void
optimize(String indexName)
void
refresh(String indexName)
org.elasticsearch.action.search.SearchResponse
search(org.elasticsearch.action.search.SearchRequest request)
org.elasticsearch.action.search.SearchResponse
searchScroll(org.elasticsearch.action.search.SearchScrollRequest request)
void
updateAlias(String aliasName, String indexName)
boolean
waitForYellowStatus(String[] indexNames, int timeoutSecond)
-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
waitForYellowStatus
boolean waitForYellowStatus(String[] indexNames, int timeoutSecond)
-
getHealthStatus
org.elasticsearch.cluster.health.ClusterHealthStatus getHealthStatus(String[] indexNames)
-
refresh
void refresh(String indexName)
-
flush
void flush(String indexName)
-
optimize
void optimize(String indexName)
-
indexExists
boolean indexExists(String indexName)
-
deleteIndex
void deleteIndex(String indexName, int timeoutSecond)
-
getMapping
String getMapping(String indexName)
Returns the mapping from elastic, exposed for testing purposes- Since:
- 2021.17
-
getNodesInfo
String getNodesInfo()
-
getNodesStats
String getNodesStats()
-
aliasExists
boolean aliasExists(String aliasName)
-
getFirstIndexForAlias
String getFirstIndexForAlias(String aliasName)
Returns the name of the index referenced by the alias. Returns null if the alias does not exists.
-
bulk
org.elasticsearch.action.bulk.BulkResponse bulk(org.elasticsearch.action.bulk.BulkRequest request)
-
delete
org.elasticsearch.action.delete.DeleteResponse delete(org.elasticsearch.action.delete.DeleteRequest request)
-
search
org.elasticsearch.action.search.SearchResponse search(org.elasticsearch.action.search.SearchRequest request)
-
searchScroll
org.elasticsearch.action.search.SearchResponse searchScroll(org.elasticsearch.action.search.SearchScrollRequest request)
-
get
org.elasticsearch.action.get.GetResponse get(org.elasticsearch.action.get.GetRequest request)
-
index
org.elasticsearch.action.index.IndexResponse index(org.elasticsearch.action.index.IndexRequest request)
Performs the indexing request.- Throws:
ConcurrentUpdateException
- if a more recent version of the document exits.
-
clearScroll
org.elasticsearch.action.search.ClearScrollResponse clearScroll(org.elasticsearch.action.search.ClearScrollRequest request)
-
bulkProcessorBuilder
org.elasticsearch.action.bulk.BulkProcessor.Builder bulkProcessorBuilder(org.elasticsearch.action.bulk.BulkProcessor.Listener listener)
Creates an elasticsearch BulkProcessor builder.- Since:
- 10.3
-
-