public class ElasticsearchClient extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_SETTING
The default settings.
|
static String |
ELASTICSEARCH_CLUSTER
Default Elasticsearch cluster configuration.
|
static String |
ELASTICSEARCH_HOSTS
Default Elasticsearch hosts configuration.
|
static String |
MAPPINGS
Type mappings for the index this store is related to.
|
static String |
SETTINGS
Settings for the index this store is related to.
|
| Constructor and Description |
|---|
ElasticsearchClient()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
This method closes the Elasticsearch client.
|
org.elasticsearch.client.Client |
getElasticsearchClient()
The Elasticsearch client.
|
String |
getHosts()
This method sets the hosts.
|
String |
getIndex(String tenantId) |
void |
init()
Initialize the client.
|
void |
initTenant(String tenantId) |
void |
setHosts(String hosts)
This method returns the hosts.
|
String |
toString() |
public static final String ELASTICSEARCH_HOSTS
public static final String ELASTICSEARCH_CLUSTER
public static final String SETTINGS
public static final String MAPPINGS
public static final String DEFAULT_SETTING
public String getHosts()
public void setHosts(String hosts)
hosts - The hostspublic void init()
throws Exception
Exception - Failed to initialize the clientpublic org.elasticsearch.client.Client getElasticsearchClient()
public void close()
Copyright © 2015 Red Hat, Inc.. All rights reserved.