@Deprecated public class ElasticsearchTemplate extends AbstractElasticsearchTemplate
AbstractElasticsearchTemplate.DocumentCallback<T>, AbstractElasticsearchTemplate.ReadDocumentCallback<T>, AbstractElasticsearchTemplate.ReadSearchDocumentResponseCallback<T>, AbstractElasticsearchTemplate.ReadSearchScrollDocumentResponseCallback<T>, AbstractElasticsearchTemplate.SearchDocumentResponseCallback<T>elasticsearchConverter, requestFactory, routingResolver| Constructor and Description |
|---|
ElasticsearchTemplate(org.elasticsearch.client.Client client)
Deprecated.
|
ElasticsearchTemplate(org.elasticsearch.client.Client client,
ElasticsearchConverter elasticsearchConverter)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bulkUpdate(List<UpdateQuery> queries,
BulkOptions bulkOptions,
IndexCoordinates index)
Deprecated.
Bulk update all objects.
|
ClusterOperations |
cluster()
Deprecated.
return a
ClusterOperations instance that uses the same client communication setup as this
ElasticsearchOperations instance. |
long |
count(Query query,
Class<?> clazz,
IndexCoordinates index)
Deprecated.
return number of elements found by given query
|
String |
delete(Object entity,
IndexCoordinates index)
Deprecated.
Deletes the given entity
|
ByQueryResponse |
delete(Query query,
Class<?> clazz,
IndexCoordinates index)
Deprecated.
Delete all records matching the query.
|
List<IndexedObjectInformation> |
doBulkOperation(List<?> queries,
BulkOptions bulkOptions,
IndexCoordinates index)
Deprecated.
|
protected AbstractElasticsearchTemplate |
doCopy()
Deprecated.
|
protected String |
doDelete(String id,
String routing,
IndexCoordinates index)
Deprecated.
|
protected boolean |
doExists(String id,
IndexCoordinates index)
Deprecated.
|
String |
doIndex(IndexQuery query,
IndexCoordinates index)
Deprecated.
|
<T> T |
get(String id,
Class<T> clazz,
IndexCoordinates index)
Deprecated.
Retrieves an object from the index specified in the entity's Document annotation.
|
org.elasticsearch.client.Client |
getClient()
Deprecated.
|
protected String |
getClusterVersion()
Deprecated.
tries to extract the version of the Elasticsearch cluster
|
protected org.elasticsearch.action.search.MultiSearchResponse.Item[] |
getMultiSearchResult(org.elasticsearch.action.search.MultiSearchRequest request)
Deprecated.
|
String |
getSearchTimeout()
Deprecated.
|
IndexOperations |
indexOps(Class<?> clazz)
Deprecated.
get an
IndexOperations that is bound to the given class |
IndexOperations |
indexOps(IndexCoordinates index)
Deprecated.
get an
IndexOperations that is bound to the given index |
<T> List<MultiGetItem<T>> |
multiGet(Query query,
Class<T> clazz,
IndexCoordinates index)
Deprecated.
Execute a multiGet against elasticsearch for the given ids.
|
<T> SearchHits<T> |
search(Query query,
Class<T> clazz,
IndexCoordinates index)
Deprecated.
Execute the criteria query against elasticsearch and return result as
SearchHits |
void |
searchScrollClear(List<String> scrollIds)
Deprecated.
|
<T> SearchScrollHits<T> |
searchScrollContinue(String scrollId,
long scrollTimeInMillis,
Class<T> clazz,
IndexCoordinates index)
Deprecated.
|
<T> SearchScrollHits<T> |
searchScrollStart(long scrollTimeInMillis,
Query query,
Class<T> clazz,
IndexCoordinates index)
Deprecated.
|
void |
setSearchTimeout(String searchTimeout)
Deprecated.
|
org.elasticsearch.action.search.SearchResponse |
suggest(org.elasticsearch.search.suggest.SuggestBuilder suggestion,
IndexCoordinates index)
Deprecated.
Does a suggest query
|
UpdateResponse |
update(UpdateQuery query,
IndexCoordinates index)
Deprecated.
Partial update of the document.
|
ByQueryResponse |
updateByQuery(UpdateQuery query,
IndexCoordinates index)
Deprecated.
Update document(s) by query
|
bulkIndex, bulkIndex, bulkIndex, bulkOperation, bulkUpdate, checkForBulkOperationFailure, count, createElasticsearchConverter, delete, delete, delete, delete, delete, exists, exists, get, getElasticsearchConverter, getEntityRouting, getIndexCoordinatesFor, getRefreshPolicy, getRequestFactory, index, initialize, maybeCallbackAfterConvert, maybeCallbackAfterSave, maybeCallbackAfterSaveWithQueries, maybeCallbackAfterSaveWithQuery, maybeCallbackBeforeConvert, maybeCallbackBeforeConvertWithQueries, maybeCallbackBeforeConvertWithQuery, multiGet, multiSearch, multiSearch, multiSearch, multiSearch, prepareWriteRequest, prepareWriteRequestBuilder, save, save, save, save, save, search, search, search, searchForStream, searchForStream, searchScrollClear, setApplicationContext, setEntityCallbacks, setRefreshPolicy, suggest, toArray, updateIndexedObject, updateIndexedObjectsWithQueries, withRoutingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstringIdRepresentationbulkIndex, bulkUpdatecount, searchOne, searchOnepublic ElasticsearchTemplate(org.elasticsearch.client.Client client)
public ElasticsearchTemplate(org.elasticsearch.client.Client client,
ElasticsearchConverter elasticsearchConverter)
protected AbstractElasticsearchTemplate doCopy()
doCopy in class AbstractElasticsearchTemplatepublic IndexOperations indexOps(Class<?> clazz)
ElasticsearchOperationsIndexOperations that is bound to the given classpublic IndexOperations indexOps(IndexCoordinates index)
ElasticsearchOperationsIndexOperations that is bound to the given indexpublic ClusterOperations cluster()
ElasticsearchOperationsClusterOperations instance that uses the same client communication setup as this
ElasticsearchOperations instance.public void setSearchTimeout(String searchTimeout)
public String doIndex(IndexQuery query, IndexCoordinates index)
doIndex in class AbstractElasticsearchTemplate@Nullable public <T> T get(String id, Class<T> clazz, IndexCoordinates index)
DocumentOperationsid - the id of the objectclazz - the entity class,index - the index from which the object is read.public <T> List<MultiGetItem<T>> multiGet(Query query, Class<T> clazz, IndexCoordinates index)
DocumentOperationsquery - the query defining the ids of the objects to getclazz - the type of the object to be returnedindex - the index(es) from which the objects are read.MultiGetItemsprotected boolean doExists(String id, IndexCoordinates index)
doExists in class AbstractElasticsearchTemplatepublic void bulkUpdate(List<UpdateQuery> queries, BulkOptions bulkOptions, IndexCoordinates index)
DocumentOperationsqueries - the queries to execute in bulkbulkOptions - options to be added to the bulk requestprotected String doDelete(String id, @Nullable String routing, IndexCoordinates index)
doDelete in class AbstractElasticsearchTemplatepublic ByQueryResponse delete(Query query, Class<?> clazz, IndexCoordinates index)
DocumentOperationsquery - query defining the objectsclazz - The entity class, must be annotated with
Documentindex - the index from which to deletepublic String delete(Object entity, IndexCoordinates index)
DocumentOperationsdelete in interface DocumentOperationsdelete in class AbstractElasticsearchTemplateentity - the entity to deleteindex - the index from which to deletepublic UpdateResponse update(UpdateQuery query, IndexCoordinates index)
DocumentOperationsquery - query defining the updateindex - the index where to update the recordspublic ByQueryResponse updateByQuery(UpdateQuery query, IndexCoordinates index)
DocumentOperationsquery - query defining the update, must not be nullindex - the index where to update the records , must not be nullpublic List<IndexedObjectInformation> doBulkOperation(List<?> queries, BulkOptions bulkOptions, IndexCoordinates index)
doBulkOperation in class AbstractElasticsearchTemplatepublic long count(Query query, @Nullable Class<?> clazz, IndexCoordinates index)
SearchOperationsquery - the query to executeclazz - the entity clazz used for property mappingindex - the index to run the query againstpublic <T> SearchHits<T> search(Query query, Class<T> clazz, IndexCoordinates index)
SearchOperationsSearchHitsT - element return typequery - the query to executeclazz - the entity clazz used for property mappingindex - the index to run the query againstpublic <T> SearchScrollHits<T> searchScrollStart(long scrollTimeInMillis, Query query, Class<T> clazz, IndexCoordinates index)
searchScrollStart in class AbstractElasticsearchTemplatepublic <T> SearchScrollHits<T> searchScrollContinue(@Nullable String scrollId, long scrollTimeInMillis, Class<T> clazz, IndexCoordinates index)
searchScrollContinue in class AbstractElasticsearchTemplatepublic void searchScrollClear(List<String> scrollIds)
searchScrollClear in class AbstractElasticsearchTemplatepublic org.elasticsearch.action.search.SearchResponse suggest(org.elasticsearch.search.suggest.SuggestBuilder suggestion,
IndexCoordinates index)
SearchOperationssuggestion - the queryindex - the index to run the query againstprotected org.elasticsearch.action.search.MultiSearchResponse.Item[] getMultiSearchResult(org.elasticsearch.action.search.MultiSearchRequest request)
getMultiSearchResult in class AbstractElasticsearchTemplateprotected String getClusterVersion()
AbstractElasticsearchTemplategetClusterVersion in class AbstractElasticsearchTemplatepublic org.elasticsearch.client.Client getClient()
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.