Interface ElasticsearchOperations
- All Superinterfaces:
DocumentOperations,SearchOperations
- All Known Implementing Classes:
AbstractElasticsearchTemplate,ElasticsearchRestTemplate,ElasticsearchTemplate
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.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 Stringgets the String representation for an id.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, delete, exists, exists, get, get, index, multiGet, multiGet, reindex, save, save, save, save, save, submitReindex, update, updateByQueryMethods inherited from interface org.springframework.data.elasticsearch.core.SearchOperations
count, count, count, idsQuery, matchAllQuery, multiSearch, multiSearch, multiSearch, multiSearch, search, search, search, search, searchForStream, searchForStream, searchOne, searchOne, suggest, suggest
-
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
gets the String representation for an id.- Parameters:
id-- Returns:
- Since:
- 4.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
-