public class RestElasticSearchClient extends Object implements ElasticSearchClient
| Modifier and Type | Field and Description |
|---|---|
static String |
INCLUDE_TYPE_NAME_PARAMETER |
| Constructor and Description |
|---|
RestElasticSearchClient(org.elasticsearch.client.RestClient delegate,
int scrollKeepAlive,
boolean useMappingTypesForES7,
int retryAttemptLimit,
Set<Integer> retryOnErrorCodes,
long retryInitialWaitMs,
long retryMaxWaitMs) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAlias(String alias,
String index) |
double |
avg(String indexName,
Map<String,Object> requestData,
String fieldName) |
void |
bulkRequest(List<ElasticSearchMutation> requests,
String ingestPipeline) |
void |
clearStore(String indexName,
String storeName) |
void |
close() |
void |
clusterHealthRequest(String timeout) |
long |
countTotal(String indexName,
Map<String,Object> requestData) |
void |
createIndex(String indexName,
Map<String,Object> settings) |
void |
createMapping(String indexName,
String typeName,
Map<String,Object> mapping) |
void |
createStoredScript(String scriptName,
Map<String,Object> script) |
void |
deleteIndex(String indexName) |
void |
deleteScroll(String scrollId) |
Map |
getIndexSettings(String indexName) |
ElasticMajorVersion |
getMajorVersion() |
IndexMapping |
getMapping(String indexName,
String typeName) |
ESScriptResponse |
getStoredScript(String scriptName) |
boolean |
indexExists(String indexName) |
boolean |
isAlias(String aliasName) |
boolean |
isIndex(String indexName) |
Number |
max(String indexName,
Map<String,Object> requestData,
String fieldName,
Class<? extends Number> expectedType) |
Number |
min(String indexName,
Map<String,Object> requestData,
String fieldName,
Class<? extends Number> expectedType) |
RestSearchResponse |
search(String scrollId) |
RestSearchResponse |
search(String indexName,
Map<String,Object> requestData,
boolean useScroll) |
void |
setBulkRefresh(String bulkRefresh) |
void |
setRetryOnConflict(Integer retryOnConflict) |
Number |
sum(String indexName,
Map<String,Object> requestData,
String fieldName,
Class<? extends Number> expectedType) |
void |
updateClusterSettings(Map<String,Object> settings) |
void |
updateIndexSettings(String indexName,
Map<String,Object> settings) |
public static final String INCLUDE_TYPE_NAME_PARAMETER
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic ElasticMajorVersion getMajorVersion()
getMajorVersion in interface ElasticSearchClientpublic void clusterHealthRequest(String timeout) throws IOException
clusterHealthRequest in interface ElasticSearchClientIOExceptionpublic boolean indexExists(String indexName) throws IOException
indexExists in interface ElasticSearchClientIOExceptionpublic boolean isIndex(String indexName)
isIndex in interface ElasticSearchClientpublic boolean isAlias(String aliasName)
isAlias in interface ElasticSearchClientpublic void createStoredScript(String scriptName, Map<String,Object> script) throws IOException
createStoredScript in interface ElasticSearchClientIOExceptionpublic ESScriptResponse getStoredScript(String scriptName) throws IOException
getStoredScript in interface ElasticSearchClientIOExceptionpublic void createIndex(String indexName, Map<String,Object> settings) throws IOException
createIndex in interface ElasticSearchClientIOExceptionpublic void updateIndexSettings(String indexName, Map<String,Object> settings) throws IOException
updateIndexSettings in interface ElasticSearchClientIOExceptionpublic void updateClusterSettings(Map<String,Object> settings) throws IOException
updateClusterSettings in interface ElasticSearchClientIOExceptionpublic void addAlias(String alias, String index) throws IOException
addAlias in interface ElasticSearchClientIOExceptionpublic Map getIndexSettings(String indexName) throws IOException
getIndexSettings in interface ElasticSearchClientIOExceptionpublic void createMapping(String indexName, String typeName, Map<String,Object> mapping) throws IOException
createMapping in interface ElasticSearchClientIOExceptionpublic IndexMapping getMapping(String indexName, String typeName) throws IOException
getMapping in interface ElasticSearchClientIOExceptionpublic void deleteIndex(String indexName) throws IOException
deleteIndex in interface ElasticSearchClientIOExceptionpublic void clearStore(String indexName, String storeName) throws IOException
clearStore in interface ElasticSearchClientIOExceptionpublic void bulkRequest(List<ElasticSearchMutation> requests, String ingestPipeline) throws IOException
bulkRequest in interface ElasticSearchClientIOExceptionpublic void setRetryOnConflict(Integer retryOnConflict)
public long countTotal(String indexName, Map<String,Object> requestData) throws IOException
countTotal in interface ElasticSearchClientIOExceptionpublic Number min(String indexName, Map<String,Object> requestData, String fieldName, Class<? extends Number> expectedType) throws IOException
min in interface ElasticSearchClientIOExceptionpublic Number max(String indexName, Map<String,Object> requestData, String fieldName, Class<? extends Number> expectedType) throws IOException
max in interface ElasticSearchClientIOExceptionpublic double avg(String indexName, Map<String,Object> requestData, String fieldName) throws IOException
avg in interface ElasticSearchClientIOExceptionpublic Number sum(String indexName, Map<String,Object> requestData, String fieldName, Class<? extends Number> expectedType) throws IOException
sum in interface ElasticSearchClientIOExceptionpublic RestSearchResponse search(String indexName, Map<String,Object> requestData, boolean useScroll) throws IOException
search in interface ElasticSearchClientIOExceptionpublic RestSearchResponse search(String scrollId) throws IOException
search in interface ElasticSearchClientIOExceptionpublic void deleteScroll(String scrollId) throws IOException
deleteScroll in interface ElasticSearchClientIOExceptionpublic void setBulkRefresh(String bulkRefresh)
Copyright © 2012–2024. All rights reserved.