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 booleanaliasExists(String aliasName)org.elasticsearch.action.bulk.BulkResponsebulk(org.elasticsearch.action.bulk.BulkRequest request)org.elasticsearch.action.bulk.BulkProcessor.BuilderbulkProcessorBuilder(org.elasticsearch.action.bulk.BulkProcessor.Listener listener)Creates an elasticsearch BulkProcessor builder.org.elasticsearch.action.search.ClearScrollResponseclearScroll(org.elasticsearch.action.search.ClearScrollRequest request)voidcreateIndex(String indexName, String jsonSettings)voidcreateMapping(String indexName, String type, String jsonMapping)org.elasticsearch.action.delete.DeleteResponsedelete(org.elasticsearch.action.delete.DeleteRequest request)voiddeleteIndex(String indexName, int timeoutSecond)voidflush(String indexName)org.elasticsearch.action.get.GetResponseget(org.elasticsearch.action.get.GetRequest request)StringgetFirstIndexForAlias(String aliasName)Returns the name of the index referenced by the alias.org.elasticsearch.cluster.health.ClusterHealthStatusgetHealthStatus(String[] indexNames)StringgetMapping(String indexName)Returns the mapping from elastic, exposed for testing purposesStringgetNodesInfo()StringgetNodesStats()org.elasticsearch.action.index.IndexResponseindex(org.elasticsearch.action.index.IndexRequest request)Performs the indexing request.booleanindexExists(String indexName)booleanmappingExists(String indexName, String type)voidoptimize(String indexName)voidrefresh(String indexName)org.elasticsearch.action.search.SearchResponsesearch(org.elasticsearch.action.search.SearchRequest request)org.elasticsearch.action.search.SearchResponsesearchScroll(org.elasticsearch.action.search.SearchScrollRequest request)voidupdateAlias(String aliasName, String indexName)booleanwaitForYellowStatus(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
-
-