Interface ElasticsearchOperations

All Superinterfaces:
DocumentOperations, SearchOperations
All Known Implementing Classes:
AbstractElasticsearchTemplate, ElasticsearchRestTemplate, ElasticsearchTemplate

public interface ElasticsearchOperations extends DocumentOperations, SearchOperations
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 Details

    • indexOps

      IndexOperations indexOps(Class<?> clazz)
      get an IndexOperations that is bound to the given class
      Returns:
      IndexOperations
    • indexOps

      get an IndexOperations that is bound to the given index
      Returns:
      IndexOperations
    • cluster

      return a ClusterOperations instance that uses the same client communication setup as this ElasticsearchOperations instance.
      Returns:
      ClusterOperations implementation
      Since:
      4.2
    • getElasticsearchConverter

      ElasticsearchConverter getElasticsearchConverter()
    • getIndexCoordinatesFor

      IndexCoordinates getIndexCoordinatesFor(Class<?> clazz)
    • getEntityRouting

      @Nullable String getEntityRouting(Object entity)
      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

      @Nullable default String stringIdRepresentation(@Nullable Object id)
      gets the String representation for an id.
      Parameters:
      id -
      Returns:
      Since:
      4.0
    • withRouting

      ElasticsearchOperations withRouting(RoutingResolver routingResolver)
      Returns a copy of this instance with the same configuration, but that uses a different RoutingResolver to obtain routing information.
      Parameters:
      routingResolver - the RoutingResolver value, must not be null.
      Returns:
      DocumentOperations instance
      Since:
      4.2