public interface ElasticFacade.ElasticClient
Type Params | Return Type | Name and description |
---|---|---|
|
public boolean |
aliasExists(java.lang.String alias) Returns true if alias exists. |
|
public void |
bulk(java.lang.String index, java.util.List<java.util.Map> actionSourceList) Perform bulk operations. |
|
public void |
bulkIndex(java.lang.String index, java.lang.String idField, java.util.List<java.util.Map> documentList) Bulk index documents with given index name and _id from the idField in each document (if idField empty don't specify ID, let ES generate) |
|
public void |
bulkIndexDataDocument(java.util.List<java.util.Map> documentList) Bulk index documents with standard _index, _type, _id, and _timestamp fields which are used for the index and id per document but removed from the actual document sent to ElasticSearch; note that for legacy reasons related to one type per index the _type is used for the index name |
|
public RestResponse |
call(Method method, java.lang.String index, java.lang.String path, java.util.Map<java.lang.String, java.lang.String> parameters, java.lang.Object bodyJsonObject) Basic REST endpoint synchronous call |
|
public java.util.concurrent.Future<RestClient.RestResponse> |
callFuture(Method method, java.lang.String index, java.lang.String path, java.util.Map<java.lang.String, java.lang.String> parameters, java.lang.Object bodyJsonObject) Basic REST endpoint future (asynchronous) call |
|
public void |
checkCreateDataDocumentIndex(java.lang.String dataDocumentId) Check and if needed create ElasticSearch index for DataDocument with given ID |
|
public void |
checkCreateDataDocumentIndexes(java.lang.String indexName) Check and if needed create ElasticSearch indexes for all DataDocument records with given indexName |
|
public void |
createIndex(java.lang.String index, java.util.Map docMapping, java.lang.String alias) Create an index with optional document mapping and alias. |
|
public void |
delete(java.lang.String index, java.lang.String _id) Delete a document. |
|
public java.lang.Integer |
deleteByQuery(java.lang.String index, java.util.Map queryMap) Delete documents by query. |
|
public void |
deleteIndex(java.lang.String index) Delete an index. |
|
public java.util.Map |
get(java.lang.String index, java.lang.String _id) Get full/wrapped single document by ID. |
|
public java.util.List<java.util.Map> |
get(java.lang.String index, java.util.List<java.lang.String> _idList) Get multiple documents by ID. |
|
public java.lang.String |
getClusterLocation() |
|
public java.lang.String |
getClusterName() |
|
public java.util.Map |
getServerInfo() Returns a Map with the response from ElasticSearch for GET on the root path with ES server info |
|
public java.util.Map |
getSource(java.lang.String index, java.lang.String _id) Get source for a single document by ID. |
|
public void |
index(java.lang.String index, java.lang.String _id, java.util.Map document) Index a complete document (create or update). |
|
public boolean |
indexExists(java.lang.String index) Returns true if index or alias exists. |
|
public java.lang.Object |
jsonToObject(java.lang.String jsonString) Convert JSON String to Object (generally Map or List) using internal ElasticSearch specific settings |
|
public RestClient |
makeRestClient(Method method, java.lang.String index, java.lang.String path, java.util.Map<java.lang.String, java.lang.String> parameters) Make a RestClient with configured protocol/host/port and user/password if configured, RequestFactory for this ElasticClient, and the given parameters |
|
public java.lang.String |
objectToJson(java.lang.Object jsonObject) Convert Object (generally Map or List) to JSON String using internal ElasticSearch specific settings |
|
public void |
putDataDocumentMappings(java.lang.String indexName) Put document mappings for all DataDocument records with given indexName |
|
public void |
putMapping(java.lang.String index, java.util.Map docMapping) Put document mapping on an existing index. |
|
public java.util.Map |
search(java.lang.String index, java.util.Map searchMap) Search documents and get the plain object response back. |
|
public java.util.List<java.util.Map> |
searchHits(java.lang.String index, java.util.Map searchMap) Search documents. |
|
public void |
update(java.lang.String index, java.lang.String _id, java.util.Map documentFragment) Partial document update. |
|
public java.util.Map |
validateQuery(java.lang.String index, java.util.Map queryMap, boolean explain) Validate a query Map. |
|
public void |
verifyDataDocumentIndexes(java.util.List<java.util.Map> documentList) Verify index aliases and dataDocumentId based indexes from all distinct _index and _type values in documentList |
Returns true if alias exists. See https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-alias-exists.html
Perform bulk operations. See https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
actionSourceList
- List of action objects each followed by a source object if relevant.Bulk index documents with given index name and _id from the idField in each document (if idField empty don't specify ID, let ES generate)
Bulk index documents with standard _index, _type, _id, and _timestamp fields which are used for the index and id per document but removed from the actual document sent to ElasticSearch; note that for legacy reasons related to one type per index the _type is used for the index name
Basic REST endpoint synchronous call
Basic REST endpoint future (asynchronous) call
Check and if needed create ElasticSearch index for DataDocument with given ID
Check and if needed create ElasticSearch indexes for all DataDocument records with given indexName
Create an index with optional document mapping and alias. See https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html
Delete a document. See https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html
Delete documents by query. See https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
Delete an index. See https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html
Get full/wrapped single document by ID. See https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html
Get multiple documents by ID. See https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html
Returns a Map with the response from ElasticSearch for GET on the root path with ES server info
Get source for a single document by ID. See https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html
Index a complete document (create or update). See https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html
Returns true if index or alias exists. See https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html
Convert JSON String to Object (generally Map or List) using internal ElasticSearch specific settings
Make a RestClient with configured protocol/host/port and user/password if configured, RequestFactory for this ElasticClient, and the given parameters
Convert Object (generally Map or List) to JSON String using internal ElasticSearch specific settings
Put document mappings for all DataDocument records with given indexName
Put document mapping on an existing index. See https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html
Search documents and get the plain object response back. See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html
Search documents. Result is the list in 'hits.hits' from the plain object returned for convenience. See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html
Partial document update. See https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html
Validate a query Map. Returns null if valid otherwise returns Map from JSON response with 'valid' boolean and if explain is true also 'explanations' for more information. See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-validate.html
queryMap
- Map sent to ElasticSearch as the 'query' field (should not include 'query' entry, may include 'bool', 'query_string', etc)Verify index aliases and dataDocumentId based indexes from all distinct _index and _type values in documentList