Interface ElasticsearchOperations
- All Superinterfaces:
DocumentOperations
,ScriptOperations
,SearchOperations
,SqlOperations
- All Known Implementing Classes:
AbstractElasticsearchTemplate
,ElasticsearchTemplate
public interface ElasticsearchOperations
extends DocumentOperations, SearchOperations, ScriptOperations, SqlOperations
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 aClusterOperations
instance that uses the same client communication setup as this ElasticsearchOperations instance.default String
Converts 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 anIndexOperations
that is bound to the given classindexOps
(IndexCoordinates index) get anIndexOperations
that is bound to the given indexwithRefreshPolicy
(RefreshPolicy refreshPolicy) Returns a copy of this instance with the same configuration, but that uses a differentRefreshPolicy
.withRouting
(RoutingResolver routingResolver) Returns a copy of this instance with the same configuration, but that uses a differentRoutingResolver
to 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, updateByQuery
Methods inherited from interface org.springframework.data.elasticsearch.core.script.ScriptOperations
deleteScript, getScript, putScript
Methods inherited from interface org.springframework.data.elasticsearch.core.SearchOperations
closePointInTime, count, count, count, idsQuery, matchAllQuery, multiSearch, multiSearch, multiSearch, multiSearch, multiSearch, openPointInTime, openPointInTime, queryBuilderWithIds, search, search, search, search, searchForStream, searchForStream, searchOne, searchOne
Methods inherited from interface org.springframework.data.elasticsearch.core.sql.SqlOperations
search
-
Method Details
-
indexOps
get anIndexOperations
that is bound to the given class- Returns:
- IndexOperations
-
indexOps
get anIndexOperations
that is bound to the given index- Returns:
- IndexOperations
-
cluster
ClusterOperations cluster()return aClusterOperations
instance 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
-
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 differentRoutingResolver
to obtain routing information.- Parameters:
routingResolver
- theRoutingResolver
value, must not be null.- Returns:
ElasticsearchOperations
instance- Since:
- 4.2
-
withRefreshPolicy
Returns a copy of this instance with the same configuration, but that uses a differentRefreshPolicy
.- Parameters:
refreshPolicy
- theRefreshPolicy
value.- Returns:
ElasticsearchOperations
instance.- Since:
- 5.2
-