public interface ElasticClient
| Modifier and Type | Method and Description |
|---|---|
About |
about() |
BulkResponse |
bulk(java.lang.String operations,
java.lang.Boolean pretty) |
ClusterHealth |
clusterHealth() |
ClusterHealth |
clusterHealth(ClusterHealth.Status waitForStatus,
java.lang.String timeout) |
ClusterHealth |
clusterHealthForIndex(java.lang.String names,
ClusterHealth.Status waitForStatus,
java.lang.String timeout) |
IndexCreated |
createIndex(java.lang.String name,
Index index)
Create an index in Elastic.
|
IndexDeleted |
deleteAllIndexes()
Delete all indexes from Elastic.
|
DeletedDocument |
deleteDocument(java.lang.String name,
java.lang.String type,
java.lang.String id) |
DeletedDocument |
deleteDocument(java.lang.String name,
java.lang.String type,
java.lang.String id,
long epochMillisUtc) |
IndexDeleted |
deleteIndex(java.lang.String names)
Deletes a comma separated list of index names from Elastic.
|
Document |
getDocument(java.lang.String name,
java.lang.String type,
java.lang.String id,
java.lang.String sourceFields) |
Documents |
getDocuments(Mget mget) |
VersionComponents |
getVersion() |
IndexedDocument |
indexDocument(java.lang.String name,
java.lang.String type,
java.lang.String id,
java.lang.String document)
Indexes a document using default versioning scheme, which simply increments the document
version number.
|
IndexedDocument |
indexDocument(java.lang.String name,
java.lang.String type,
java.lang.String id,
java.lang.String document,
long epochMillisUtc)
Indexes a document using an external versioning scheme, based upon milliseconds since epoch
(UTC timezone).
|
boolean |
indexExists(java.lang.String name)
Checks to see if specified index exists
Elastic will return a success code (HTTP 200) if the index exists, otherwise it returns an
HTTP 404 (not found).
|
Nodes |
nodes() |
Refresh |
refreshAllIndexes() |
Refresh |
refreshIndex(java.lang.String names) |
SearchResponse |
search(java.lang.String name,
Search search) |
About about() throws ElasticException
ElasticExceptionBulkResponse bulk(java.lang.String operations, java.lang.Boolean pretty) throws ElasticException
ElasticExceptionClusterHealth clusterHealth() throws ElasticException
ElasticExceptionClusterHealth clusterHealth(ClusterHealth.Status waitForStatus, java.lang.String timeout) throws ElasticException
ElasticExceptionClusterHealth clusterHealthForIndex(java.lang.String names, ClusterHealth.Status waitForStatus, java.lang.String timeout) throws ElasticException
ElasticExceptionIndexCreated createIndex(java.lang.String name, Index index) throws ElasticException
name - index nameindex - index configurationElasticException - if there an exception making HTTP requestIndexDeleted deleteAllIndexes() throws ElasticException
ElasticException - if there an exception making HTTP requestDeletedDocument deleteDocument(java.lang.String name, java.lang.String type, java.lang.String id) throws ElasticException
ElasticExceptionDeletedDocument deleteDocument(java.lang.String name, java.lang.String type, java.lang.String id, long epochMillisUtc) throws ElasticException
ElasticExceptionIndexDeleted deleteIndex(java.lang.String names) throws ElasticException
names - comma separated list of index namesElasticException - if there an exception making HTTP requestDocument getDocument(java.lang.String name, java.lang.String type, java.lang.String id, java.lang.String sourceFields) throws ElasticException
ElasticExceptionDocuments getDocuments(Mget mget) throws ElasticException
ElasticExceptionVersionComponents getVersion()
IndexedDocument indexDocument(java.lang.String name, java.lang.String type, java.lang.String id, java.lang.String document) throws ElasticException
name - index nametype - mapping typeid - document iddocument - document that is being indexedElasticException - if there an exception making HTTP requestIndexedDocument indexDocument(java.lang.String name, java.lang.String type, java.lang.String id, java.lang.String document, long epochMillisUtc) throws ElasticException
name - index nametype - mapping typeid - document iddocument - document that is being indexedepochMillisUtc - Number of milliseconds since epoch (normalized to UTC time)ElasticException - if there an exception making HTTP requestboolean indexExists(java.lang.String name)
throws ElasticException
name - index nameElasticException - if there an exception making HTTP requestNodes nodes() throws ElasticException
ElasticExceptionRefresh refreshAllIndexes() throws ElasticException
ElasticExceptionRefresh refreshIndex(java.lang.String names) throws ElasticException
ElasticExceptionSearchResponse search(java.lang.String name, Search search)