public class IndexHelper extends Object implements IndexHelperInterface<org.elasticsearch.client.Client>
| Modifier and Type | Class and Description |
|---|---|
static class |
IndexHelper.Builder |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkIndex() |
org.elasticsearch.client.Client |
client() |
long |
count() |
void |
createIndex(CreateIndex createIndex) |
void |
deleteIndex() |
String |
getIndexName() |
IndexHelper |
mapping(String type,
Supplier<String> mapping) |
static IndexHelper.Builder |
of(org.slf4j.Logger log,
ESClientFactory client,
ElasticSearchIndex index) |
static IndexHelper |
of(org.slf4j.Logger log,
ESClientFactory client,
String indexName,
String objectType) |
static IndexHelper.Builder |
of(org.slf4j.Logger log,
ESClientFactory client,
Supplier<String> indexName,
String objectType) |
org.elasticsearch.action.admin.indices.refresh.RefreshResponse |
refresh() |
void |
setIndexName(String indexName) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateIndex, createIndexIfNotExists, createIndexIfNotExistspublic static IndexHelper of(org.slf4j.Logger log, ESClientFactory client, String indexName, String objectType)
public static IndexHelper.Builder of(org.slf4j.Logger log, ESClientFactory client, Supplier<String> indexName, String objectType)
public static IndexHelper.Builder of(org.slf4j.Logger log, ESClientFactory client, ElasticSearchIndex index)
public IndexHelper mapping(String type, Supplier<String> mapping)
public org.elasticsearch.client.Client client()
client in interface IndexHelperInterface<org.elasticsearch.client.Client>public void createIndex(CreateIndex createIndex)
createIndex in interface IndexHelperInterface<org.elasticsearch.client.Client>public boolean checkIndex()
checkIndex in interface IndexHelperInterface<org.elasticsearch.client.Client>public void deleteIndex()
public org.elasticsearch.action.admin.indices.refresh.RefreshResponse refresh()
public long count()
count in interface IndexHelperInterface<org.elasticsearch.client.Client>public void setIndexName(String indexName)
public String getIndexName()
Copyright © 2020. All rights reserved.