Interface ElasticsearchOperations
- All Superinterfaces:
DocumentOperations,ScriptOperations,SearchOperations
- All Known Implementing Classes:
AbstractElasticsearchTemplate,ElasticsearchRestTemplate,ElasticsearchTemplate
public interface ElasticsearchOperations
extends DocumentOperations, SearchOperations, ScriptOperations
ElasticsearchOperations. Since 4.0 this interface only contains common helper functions, the other methods have been
moved to the different interfaces that are extended by ElasticsearchOperations. The interfaces now reflect the
REST API structure of
Elasticsearch.
- Author:
- Rizwan Idrees, Mohsin Husen, Kevin Leturc, Zetang Zeng, Dmitriy Yakovlev, Peter-Josef Meisch
-
Method Summary
Modifier and TypeMethodDescriptioncluster()return aClusterOperationsinstance that uses the same client communication setup as this ElasticsearchOperations instance.default StringConverts an idValue to a String representation.getEntityRouting(Object entity) gets the routing for an entity which might be defined by a join-type relationgetIndexCoordinatesFor(Class<?> clazz) get anIndexOperationsthat is bound to the given classindexOps(IndexCoordinates index) get anIndexOperationsthat is bound to the given indexdefault StringDeprecated.withRouting(RoutingResolver routingResolver) Returns a copy of this instance with the same configuration, but that uses a differentRoutingResolverto obtain routing information.Methods inherited from interface org.springframework.data.elasticsearch.core.DocumentOperations
bulkIndex, bulkIndex, bulkIndex, bulkIndex, bulkUpdate, bulkUpdate, bulkUpdate, delete, delete, delete, delete, delete, delete, exists, exists, get, get, index, multiGet, multiGet, reindex, save, save, save, save, save, submitReindex, update, update, update, updateByQueryMethods inherited from interface org.springframework.data.elasticsearch.core.script.ScriptOperations
deleteScript, getScript, putScriptMethods inherited from interface org.springframework.data.elasticsearch.core.SearchOperations
closePointInTime, count, count, count, idsQuery, matchAllQuery, multiSearch, multiSearch, multiSearch, multiSearch, multiSearch, openPointInTime, openPointInTime, search, search, search, search, searchForStream, searchForStream, searchOne, searchOne
-
Method Details
-
indexOps
get anIndexOperationsthat is bound to the given class- Returns:
- IndexOperations
-
indexOps
get anIndexOperationsthat is bound to the given index- Returns:
- IndexOperations
-
cluster
ClusterOperations cluster()return aClusterOperationsinstance that uses the same client communication setup as this ElasticsearchOperations instance.- Returns:
- ClusterOperations implementation
- Since:
- 4.2
-
getElasticsearchConverter
ElasticsearchConverter getElasticsearchConverter() -
getIndexCoordinatesFor
-
getEntityRouting
gets the routing for an entity which might be defined by a join-type relation- Parameters:
entity- the entity- Returns:
- the routing, may be null if not set.
- Since:
- 4.1
-
stringIdRepresentation
Deprecated.since 5.0, useconvertId(Object).gets the String representation for an id.- Parameters:
id-- Returns:
- String representation
- Since:
- 4.0
-
convertId
Converts an idValue to a String representation. The default implementation callsElasticsearchConverter.convertId(Object)- Parameters:
idValue- the value to convert- Returns:
- the converted value or null if idValue is null
- Since:
- 5.0
-
withRouting
Returns a copy of this instance with the same configuration, but that uses a differentRoutingResolverto obtain routing information.- Parameters:
routingResolver- theRoutingResolvervalue, must not be null.- Returns:
- DocumentOperations instance
- Since:
- 4.2
-
convertId(Object).