Record Context

  • This record API allows to interact with Elasticsearch backend
  • Context Variable: record

API Interface

//Get a (domain|organization|system|gloabl) record
 Map<String, Object> get(String recordId, String id);

//Get a record
 Map<String, Object> get(long recordId, String id);

//Delete records by query
void clear(long recordId, String query);

//Delete (domain|organization|system|gloabl) records by query
void clear(String recordId, String query);

//Delete all (domain|organization|system|gloabl) records
void clear(String recordId);

//Delete all records
void clear(long recordId);

//Count all records by query
int count(long recordId, String query);

//Count (domain|organization|system|gloabl) all records
int count(String recordId);

//Count all records
int count(long recordId);

//Count (domain|organization|system|gloabl) records by query
int count(String recordId, String query);

//Merge old with new values, create if does not exist
void merge(long recordId, String id, Map<String, Object> values);

//Merge (domain|organization|system|gloabl) old with new values, create if does not exist
void merge(String recordId, String id, Map<String, Object> values);

//Delete a record
boolean delete(long recordId, String id);

//Delete a (domain|organization|system|gloabl) record
boolean delete(String recordId, String id);

//Insert a document(object) into the Elasticsearch record index with supplied ID
String insert(long recordId, String id, Object bean);

//Insert a document into the Elasticsearch (domain|organization|system|gloabl) record index with default random ID
String insert(String recordId, Map<String, Object> values);

//Insert a document into the Elasticsearch record index with default random ID
String insert(long recordId, Map<String, Object> values);

//Insert a document(object) into the Elasticsearch (domain|organization|system|gloabl) record index with default random ID
String insert(String recordId, Object bean);

//Insert a document into the Elasticsearch (domain|organization|system|gloabl) record index with default random ID
String insert(String recordId, JSONObject doc);

//Insert a document(object) into the Elasticsearch record index with default random ID
String insert(long recordId, Object bean);

//Insert a document into the Elasticsearch (domain|organization|system|gloabl) record index with supplied ID
void insert(String recordId, String id, JSONObject doc);

//Insert a document into the Elasticsearch record index with supplied ID
void insert(long recordId, String id, JSONObject values);

//Insert a document(object) into the Elasticsearch (domain|organization|system|gloabl) record index with supplied ID
String insert(String recordId, String id, Object bean);

//Insert a document into the Elasticsearch record index with supplied ID
void insert(long recordId, String id, Map<String, Object> values);

//Insert a document into the Elasticsearch (domain|organization|system|gloabl) record index with supplied ID
void insert(String recordId, String id, Map<String, Object> values);

//Insert a document into the Elasticsearch record index with default random ID
String insert(long recordId, JSONObject values);

//Search elastic search records index
Map<String,Object> search(long recordId, String extraPath, Map<String, String> queryParams, String query);

//Search elastic search (domain|organization|system|gloabl) records index
Map<String,Object> search(String recordId, Map<String, String> queryParams, String query);

//Search elastic search records index
Map<String,Object> search(long recordId, String query);

//Search elastic search (domain|organization|system|gloabl) records index
Map<String,Object> search(String recordId, String query);

//Search elastic search records index
Map<String,Object> search(long recordId, Map<String, String> queryParams, String query);

//Search elastic search (domain|organization|system|gloabl) records index
Map<String,Object> search(String recordId, String extraPath, Map<String, String> queryParams, String query);

//Search elastic search records index
Map<String,Object> searchByTemplate(long recordId, String template, Map<String,Object> args);

//Search elastic search (domain|organization|system|gloabl) records index
Map<String,Object> searchByTemplate(String recordId, String template, Map<String,Object> args);

APIs Inherited From

Context Base

See Also

Elastic Context

Related REST APIs

Search By Query
Search by Template
Count By Query
Find By ID
Merge By ID
Update By Query
Update by Template
Remove By ID
Purge
Purge by Template
Scroll previous result set