|
Spring Data Elasticsearch | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.elasticsearch.core.ElasticsearchTemplate
public class ElasticsearchTemplate
ElasticsearchTemplate
| Constructor Summary | |
|---|---|
ElasticsearchTemplate(org.elasticsearch.client.Client client)
|
|
ElasticsearchTemplate(org.elasticsearch.client.Client client,
ElasticsearchConverter elasticsearchConverter)
|
|
| Method Summary | ||
|---|---|---|
void |
bulkIndex(List<IndexQuery> queries)
Bulk index all objects. |
|
|
count(SearchQuery query,
Class<T> clazz)
return number of elements found by for given query |
|
|
createIndex(Class<T> clazz)
Create an index |
|
|
delete(Class<T> clazz,
String id)
Delete the one object with provided id |
|
|
delete(DeleteQuery query,
Class<T> clazz)
Delete all records matching the query |
|
String |
delete(String indexName,
String type,
String id)
Delete the one object with provided id |
|
ElasticsearchConverter |
getElasticsearchConverter()
|
|
String |
index(IndexQuery query)
Index an object. |
|
|
queryForIds(SearchQuery query)
Execute the query against elasticsearch and return ids |
|
|
queryForObject(CriteriaQuery query,
Class<T> clazz)
Execute the query against elasticsearch and return the first returned object |
|
|
queryForObject(GetQuery query,
Class<T> clazz)
Execute the query against elasticsearch and return the first returned object |
|
|
queryForObject(StringQuery query,
Class<T> clazz)
Execute the query against elasticsearch and return the first returned object |
|
|
queryForPage(CriteriaQuery query,
Class<T> clazz)
Execute the query against elasticsearch and return result as Page |
|
|
queryForPage(SearchQuery query,
Class<T> clazz)
Execute the query against elasticsearch and return result as Page |
|
|
queryForPage(SearchQuery query,
ResultsMapper<T> resultsMapper)
Execute the query against elasticsearch and return result as Page |
|
|
queryForPage(StringQuery query,
Class<T> clazz)
Execute the query against elasticsearch and return result as Page |
|
|
refresh(Class<T> clazz,
boolean waitForOperation)
refresh the index |
|
void |
refresh(String indexName,
boolean waitForOperation)
refresh the index |
|
String |
scan(SearchQuery query,
long scrollTimeInMillis,
boolean noFields)
Returns scroll id for scan query |
|
|
scroll(String scrollId,
long scrollTimeInMillis,
ResultsMapper<T> resultsMapper)
Scrolls the results for give scroll id |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ElasticsearchTemplate(org.elasticsearch.client.Client client)
public ElasticsearchTemplate(org.elasticsearch.client.Client client,
ElasticsearchConverter elasticsearchConverter)
| Method Detail |
|---|
public <T> boolean createIndex(Class<T> clazz)
ElasticsearchOperations
createIndex in interface ElasticsearchOperationspublic ElasticsearchConverter getElasticsearchConverter()
getElasticsearchConverter in interface ElasticsearchOperations
public <T> T queryForObject(GetQuery query,
Class<T> clazz)
ElasticsearchOperations
queryForObject in interface ElasticsearchOperations
public <T> T queryForObject(CriteriaQuery query,
Class<T> clazz)
ElasticsearchOperations
queryForObject in interface ElasticsearchOperations
public <T> T queryForObject(StringQuery query,
Class<T> clazz)
ElasticsearchOperations
queryForObject in interface ElasticsearchOperations
public <T> Page<T> queryForPage(SearchQuery query,
Class<T> clazz)
ElasticsearchOperationsPage
queryForPage in interface ElasticsearchOperations
public <T> Page<T> queryForPage(SearchQuery query,
ResultsMapper<T> resultsMapper)
ElasticsearchOperationsPage
queryForPage in interface ElasticsearchOperationspublic <T> List<String> queryForIds(SearchQuery query)
ElasticsearchOperations
queryForIds in interface ElasticsearchOperations
public <T> Page<T> queryForPage(CriteriaQuery query,
Class<T> clazz)
ElasticsearchOperationsPage
queryForPage in interface ElasticsearchOperations
public <T> Page<T> queryForPage(StringQuery query,
Class<T> clazz)
ElasticsearchOperationsPage
queryForPage in interface ElasticsearchOperations
public <T> long count(SearchQuery query,
Class<T> clazz)
ElasticsearchOperations
count in interface ElasticsearchOperationspublic String index(IndexQuery query)
ElasticsearchOperations
index in interface ElasticsearchOperationspublic void bulkIndex(List<IndexQuery> queries)
ElasticsearchOperations
bulkIndex in interface ElasticsearchOperations
public String delete(String indexName,
String type,
String id)
ElasticsearchOperations
delete in interface ElasticsearchOperations
public <T> String delete(Class<T> clazz,
String id)
ElasticsearchOperations
delete in interface ElasticsearchOperations
public <T> void delete(DeleteQuery query,
Class<T> clazz)
ElasticsearchOperations
delete in interface ElasticsearchOperations
public void refresh(String indexName,
boolean waitForOperation)
ElasticsearchOperations
refresh in interface ElasticsearchOperations
public <T> void refresh(Class<T> clazz,
boolean waitForOperation)
ElasticsearchOperations
refresh in interface ElasticsearchOperations
public String scan(SearchQuery query,
long scrollTimeInMillis,
boolean noFields)
ElasticsearchOperations
scan in interface ElasticsearchOperations
public <T> Page<T> scroll(String scrollId,
long scrollTimeInMillis,
ResultsMapper<T> resultsMapper)
ElasticsearchOperations
scroll in interface ElasticsearchOperations
|
Spring Data Elasticsearch | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||