| Constructor and Description |
|---|
ElasticSearchClient(String clusterNodes,
String namespace,
String user,
String password) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect() |
org.elasticsearch.action.bulk.BulkProcessor |
createBulkProcessor(int bulkActions,
int bulkSize,
int flushInterval,
int concurrentRequests) |
boolean |
createIndex(String indexName,
com.google.gson.JsonObject settings,
com.google.gson.JsonObject mapping) |
boolean |
createTemplate(String indexName,
com.google.gson.JsonObject settings,
com.google.gson.JsonObject mapping) |
int |
delete(String indexName,
String timeBucketColumnName,
long endTimeBucket) |
boolean |
deleteIndex(String indexName) |
boolean |
deleteTemplate(String indexName) |
void |
forceInsert(String indexName,
String id,
org.elasticsearch.common.xcontent.XContentBuilder source) |
void |
forceUpdate(String indexName,
String id,
org.elasticsearch.common.xcontent.XContentBuilder source) |
void |
forceUpdate(String indexName,
String id,
org.elasticsearch.common.xcontent.XContentBuilder source,
long version) |
String |
formatIndexName(String indexName) |
org.elasticsearch.action.get.GetResponse |
get(String indexName,
String id) |
com.google.gson.JsonObject |
getIndex(String indexName) |
boolean |
isExistsIndex(String indexName) |
boolean |
isExistsTemplate(String indexName) |
org.elasticsearch.action.get.MultiGetResponse |
multiGet(String indexName,
List<String> ids) |
org.elasticsearch.action.index.IndexRequest |
prepareInsert(String indexName,
String id,
org.elasticsearch.common.xcontent.XContentBuilder source) |
org.elasticsearch.action.update.UpdateRequest |
prepareUpdate(String indexName,
String id,
org.elasticsearch.common.xcontent.XContentBuilder source) |
org.elasticsearch.action.search.SearchResponse |
search(String indexName,
org.elasticsearch.search.builder.SearchSourceBuilder searchSourceBuilder) |
void |
shutdown() |
public static final String TYPE
public void connect()
throws IOException
connect in interface ClientIOExceptionpublic void shutdown()
throws IOException
shutdown in interface ClientIOExceptionpublic boolean createIndex(String indexName, com.google.gson.JsonObject settings, com.google.gson.JsonObject mapping) throws IOException
IOExceptionpublic com.google.gson.JsonObject getIndex(String indexName) throws IOException
IOExceptionpublic boolean deleteIndex(String indexName) throws IOException
IOExceptionpublic boolean isExistsIndex(String indexName) throws IOException
IOExceptionpublic boolean isExistsTemplate(String indexName) throws IOException
IOExceptionpublic boolean createTemplate(String indexName, com.google.gson.JsonObject settings, com.google.gson.JsonObject mapping) throws IOException
IOExceptionpublic boolean deleteTemplate(String indexName) throws IOException
IOExceptionpublic org.elasticsearch.action.search.SearchResponse search(String indexName, org.elasticsearch.search.builder.SearchSourceBuilder searchSourceBuilder) throws IOException
IOExceptionpublic org.elasticsearch.action.get.GetResponse get(String indexName, String id) throws IOException
IOExceptionpublic org.elasticsearch.action.get.MultiGetResponse multiGet(String indexName, List<String> ids) throws IOException
IOExceptionpublic void forceInsert(String indexName, String id, org.elasticsearch.common.xcontent.XContentBuilder source) throws IOException
IOExceptionpublic void forceUpdate(String indexName, String id, org.elasticsearch.common.xcontent.XContentBuilder source, long version) throws IOException
IOExceptionpublic void forceUpdate(String indexName, String id, org.elasticsearch.common.xcontent.XContentBuilder source) throws IOException
IOExceptionpublic org.elasticsearch.action.index.IndexRequest prepareInsert(String indexName, String id, org.elasticsearch.common.xcontent.XContentBuilder source)
public org.elasticsearch.action.update.UpdateRequest prepareUpdate(String indexName, String id, org.elasticsearch.common.xcontent.XContentBuilder source)
public int delete(String indexName, String timeBucketColumnName, long endTimeBucket) throws IOException
IOExceptionpublic org.elasticsearch.action.bulk.BulkProcessor createBulkProcessor(int bulkActions,
int bulkSize,
int flushInterval,
int concurrentRequests)
Copyright © 2019 The Apache Software Foundation. All rights reserved.