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) |
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 RestElasticSearchClient(org.elasticsearch.client.RestClient delegate, int scrollKeepAlive, boolean useMappingTypesForES7)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public ElasticMajorVersion getMajorVersion()
getMajorVersion
in interface ElasticSearchClient
public void clusterHealthRequest(String timeout) throws IOException
clusterHealthRequest
in interface ElasticSearchClient
IOException
public boolean indexExists(String indexName) throws IOException
indexExists
in interface ElasticSearchClient
IOException
public boolean isIndex(String indexName)
isIndex
in interface ElasticSearchClient
public boolean isAlias(String aliasName)
isAlias
in interface ElasticSearchClient
public void createStoredScript(String scriptName, Map<String,Object> script) throws IOException
createStoredScript
in interface ElasticSearchClient
IOException
public ESScriptResponse getStoredScript(String scriptName) throws IOException
getStoredScript
in interface ElasticSearchClient
IOException
public void createIndex(String indexName, Map<String,Object> settings) throws IOException
createIndex
in interface ElasticSearchClient
IOException
public void updateIndexSettings(String indexName, Map<String,Object> settings) throws IOException
updateIndexSettings
in interface ElasticSearchClient
IOException
public void updateClusterSettings(Map<String,Object> settings) throws IOException
updateClusterSettings
in interface ElasticSearchClient
IOException
public void addAlias(String alias, String index) throws IOException
addAlias
in interface ElasticSearchClient
IOException
public Map getIndexSettings(String indexName) throws IOException
getIndexSettings
in interface ElasticSearchClient
IOException
public void createMapping(String indexName, String typeName, Map<String,Object> mapping) throws IOException
createMapping
in interface ElasticSearchClient
IOException
public IndexMapping getMapping(String indexName, String typeName) throws IOException
getMapping
in interface ElasticSearchClient
IOException
public void deleteIndex(String indexName) throws IOException
deleteIndex
in interface ElasticSearchClient
IOException
public void clearStore(String indexName, String storeName) throws IOException
clearStore
in interface ElasticSearchClient
IOException
public void bulkRequest(List<ElasticSearchMutation> requests, String ingestPipeline) throws IOException
bulkRequest
in interface ElasticSearchClient
IOException
public void setRetryOnConflict(Integer retryOnConflict)
public long countTotal(String indexName, Map<String,Object> requestData) throws IOException
countTotal
in interface ElasticSearchClient
IOException
public Number min(String indexName, Map<String,Object> requestData, String fieldName, Class<? extends Number> expectedType) throws IOException
min
in interface ElasticSearchClient
IOException
public Number max(String indexName, Map<String,Object> requestData, String fieldName, Class<? extends Number> expectedType) throws IOException
max
in interface ElasticSearchClient
IOException
public double avg(String indexName, Map<String,Object> requestData, String fieldName) throws IOException
avg
in interface ElasticSearchClient
IOException
public Number sum(String indexName, Map<String,Object> requestData, String fieldName, Class<? extends Number> expectedType) throws IOException
sum
in interface ElasticSearchClient
IOException
public RestSearchResponse search(String indexName, Map<String,Object> requestData, boolean useScroll) throws IOException
search
in interface ElasticSearchClient
IOException
public RestSearchResponse search(String scrollId) throws IOException
search
in interface ElasticSearchClient
IOException
public void deleteScroll(String scrollId) throws IOException
deleteScroll
in interface ElasticSearchClient
IOException
public void setBulkRefresh(String bulkRefresh)
Copyright © 2012–2023. All rights reserved.