Package org.webpieces.elasticsearch
Class ElasticClient
java.lang.Object
org.webpieces.elasticsearch.ElasticClient
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidAlways connect in a method NOT in construction so that people don't accidentally connect to servers in tests (ie.org.webpieces.util.futures.XFuture<org.elasticsearch.client.Response>createAlias(String alias, String indexName) org.webpieces.util.futures.XFuture<org.elasticsearch.client.Response>createIndex(String name, ElasticIndex index) org.webpieces.util.futures.XFuture<org.elasticsearch.client.Response>deleteIndex(String name) org.webpieces.util.futures.XFuture<org.elasticsearch.client.Response>getAliases(String index) org.webpieces.util.futures.XFuture<org.elasticsearch.client.Response>loadDocument(String index, long id, Object document) org.webpieces.util.futures.XFuture<org.elasticsearch.client.Response>performRequest(String method, String endpoint, Map<String, String> params, Object jsonObj, org.apache.http.Header... headers) org.webpieces.util.futures.XFuture<org.elasticsearch.client.Response>renameAlias(String previousIndex, String newIndex, String alias)
-
Constructor Details
-
ElasticClient
public ElasticClient()
-
-
Method Details
-
connect
Always connect in a method NOT in construction so that people don't accidentally connect to servers in tests (ie. every line in guice Module.configure is hit for tests even if you swap it out in a test so to avoid that, we do not create this in guice) -
close
public void close() -
loadDocument
-
createAlias
-
getAliases
public org.webpieces.util.futures.XFuture<org.elasticsearch.client.Response> getAliases(String index) -
renameAlias
-
deleteIndex
public org.webpieces.util.futures.XFuture<org.elasticsearch.client.Response> deleteIndex(String name) -
createIndex
public org.webpieces.util.futures.XFuture<org.elasticsearch.client.Response> createIndex(String name, ElasticIndex index) -
performRequest
-