Class IndicesTemplate

java.lang.Object
org.opensearch.data.client.osc.ChildTemplate<org.opensearch.client.transport.OpenSearchTransport,org.opensearch.client.opensearch.indices.OpenSearchIndicesClient>
org.opensearch.data.client.osc.IndicesTemplate
All Implemented Interfaces:
org.springframework.data.elasticsearch.core.IndexOperations

public class IndicesTemplate extends ChildTemplate<org.opensearch.client.transport.OpenSearchTransport,org.opensearch.client.opensearch.indices.OpenSearchIndicesClient> implements org.springframework.data.elasticsearch.core.IndexOperations
Implementation of the IndexOperations interface using en OpenSearchIndicesClient.
Since:
4.4
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.opensearch.data.client.osc.ChildTemplate

    ChildTemplate.ClientCallback<CLIENT,RESULT>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Class<?>
     
    protected final org.springframework.data.elasticsearch.core.mapping.IndexCoordinates
     
    protected final org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter
     

    Fields inherited from class org.opensearch.data.client.osc.ChildTemplate

    client, exceptionTranslator, requestConverter, responseConverter
  • Constructor Summary

    Constructors
    Constructor
    Description
    IndicesTemplate(org.opensearch.client.opensearch.indices.OpenSearchIndicesClient client, ClusterTemplate clusterTemplate, org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter elasticsearchConverter, Class<?> boundClass)
     
    IndicesTemplate(org.opensearch.client.opensearch.indices.OpenSearchIndicesClient client, ClusterTemplate clusterTemplate, org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter elasticsearchConverter, org.springframework.data.elasticsearch.core.mapping.IndexCoordinates boundIndex)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    alias(org.springframework.data.elasticsearch.core.index.AliasActions aliasActions)
     
    protected Class<?>
     
    boolean
     
    boolean
    create(Map<String,Object> settings)
     
    boolean
    create(Map<String,Object> settings, org.springframework.data.elasticsearch.core.document.Document mapping)
     
    org.springframework.data.elasticsearch.core.document.Document
     
    org.springframework.data.elasticsearch.core.document.Document
    createMapping(Class<?> clazz)
     
    org.springframework.data.elasticsearch.core.index.Settings
     
    org.springframework.data.elasticsearch.core.index.Settings
     
    boolean
     
    boolean
     
    boolean
    deleteComponentTemplate(org.springframework.data.elasticsearch.core.index.DeleteComponentTemplateRequest deleteComponentTemplateRequest)
     
    boolean
    deleteIndexTemplate(org.springframework.data.elasticsearch.core.index.DeleteIndexTemplateRequest deleteIndexTemplateRequest)
     
    boolean
    deleteTemplate(org.springframework.data.elasticsearch.core.index.DeleteTemplateRequest deleteTemplateRequest)
     
    protected boolean
    doCreate(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates indexCoordinates, Map<String,Object> settings, org.springframework.data.elasticsearch.core.document.Document mapping)
     
    boolean
     
    boolean
    existsComponentTemplate(org.springframework.data.elasticsearch.core.index.ExistsComponentTemplateRequest existsComponentTemplateRequest)
     
    boolean
    existsIndexTemplate(org.springframework.data.elasticsearch.core.index.ExistsIndexTemplateRequest existsIndexTemplateRequest)
     
    boolean
    existsTemplate(org.springframework.data.elasticsearch.core.index.ExistsTemplateRequest existsTemplateRequest)
     
    Map<String,Set<org.springframework.data.elasticsearch.core.index.AliasData>>
    getAliases(String... aliasNames)
     
    Map<String,Set<org.springframework.data.elasticsearch.core.index.AliasData>>
    getAliasesForIndex(String... indexNames)
     
    List<org.springframework.data.elasticsearch.core.index.TemplateResponse>
    getComponentTemplate(org.springframework.data.elasticsearch.core.index.GetComponentTemplateRequest getComponentTemplateRequest)
     
    org.springframework.data.elasticsearch.core.mapping.IndexCoordinates
     
    org.springframework.data.elasticsearch.core.mapping.IndexCoordinates
     
    List<org.springframework.data.elasticsearch.core.index.TemplateResponse>
    getIndexTemplate(org.springframework.data.elasticsearch.core.index.GetIndexTemplateRequest getIndexTemplateRequest)
     
    List<org.springframework.data.elasticsearch.core.IndexInformation>
    getInformation(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates indexCoordinates)
     
     
    org.springframework.data.elasticsearch.core.index.Settings
     
    org.springframework.data.elasticsearch.core.index.Settings
    getSettings(boolean includeDefaults)
     
    org.springframework.data.elasticsearch.core.index.TemplateData
    getTemplate(org.springframework.data.elasticsearch.core.index.GetTemplateRequest getTemplateRequest)
     
    boolean
    putComponentTemplate(org.springframework.data.elasticsearch.core.index.PutComponentTemplateRequest putComponentTemplateRequest)
     
    boolean
    putIndexTemplate(org.springframework.data.elasticsearch.core.index.PutIndexTemplateRequest putIndexTemplateRequest)
     
    boolean
    putMapping(org.springframework.data.elasticsearch.core.document.Document mapping)
     
    boolean
    putTemplate(org.springframework.data.elasticsearch.core.index.PutTemplateRequest putTemplateRequest)
     
    void
     

    Methods inherited from class org.opensearch.data.client.osc.ChildTemplate

    execute

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.data.elasticsearch.core.IndexOperations

    deleteIndexTemplate, deleteTemplate, existsIndexTemplate, existsTemplate, getIndexTemplate, getInformation, getTemplate, putMapping, putMapping
  • Field Details

    • elasticsearchConverter

      protected final org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter elasticsearchConverter
    • boundClass

      @Nullable protected final Class<?> boundClass
    • boundIndex

      @Nullable protected final org.springframework.data.elasticsearch.core.mapping.IndexCoordinates boundIndex
  • Constructor Details

    • IndicesTemplate

      public IndicesTemplate(org.opensearch.client.opensearch.indices.OpenSearchIndicesClient client, ClusterTemplate clusterTemplate, org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter elasticsearchConverter, Class<?> boundClass)
    • IndicesTemplate

      public IndicesTemplate(org.opensearch.client.opensearch.indices.OpenSearchIndicesClient client, ClusterTemplate clusterTemplate, org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter elasticsearchConverter, org.springframework.data.elasticsearch.core.mapping.IndexCoordinates boundIndex)
  • Method Details

    • checkForBoundClass

      protected Class<?> checkForBoundClass()
    • create

      public boolean create()
      Specified by:
      create in interface org.springframework.data.elasticsearch.core.IndexOperations
    • create

      public boolean create(Map<String,Object> settings)
      Specified by:
      create in interface org.springframework.data.elasticsearch.core.IndexOperations
    • create

      public boolean create(Map<String,Object> settings, org.springframework.data.elasticsearch.core.document.Document mapping)
      Specified by:
      create in interface org.springframework.data.elasticsearch.core.IndexOperations
    • createWithMapping

      public boolean createWithMapping()
      Specified by:
      createWithMapping in interface org.springframework.data.elasticsearch.core.IndexOperations
    • doCreate

      protected boolean doCreate(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates indexCoordinates, Map<String,Object> settings, @Nullable org.springframework.data.elasticsearch.core.document.Document mapping)
    • delete

      public boolean delete()
      Specified by:
      delete in interface org.springframework.data.elasticsearch.core.IndexOperations
    • exists

      public boolean exists()
      Specified by:
      exists in interface org.springframework.data.elasticsearch.core.IndexOperations
    • refresh

      public void refresh()
      Specified by:
      refresh in interface org.springframework.data.elasticsearch.core.IndexOperations
    • createMapping

      public org.springframework.data.elasticsearch.core.document.Document createMapping()
      Specified by:
      createMapping in interface org.springframework.data.elasticsearch.core.IndexOperations
    • createMapping

      public org.springframework.data.elasticsearch.core.document.Document createMapping(Class<?> clazz)
      Specified by:
      createMapping in interface org.springframework.data.elasticsearch.core.IndexOperations
    • putMapping

      public boolean putMapping(org.springframework.data.elasticsearch.core.document.Document mapping)
      Specified by:
      putMapping in interface org.springframework.data.elasticsearch.core.IndexOperations
    • getMapping

      public Map<String,Object> getMapping()
      Specified by:
      getMapping in interface org.springframework.data.elasticsearch.core.IndexOperations
    • createSettings

      public org.springframework.data.elasticsearch.core.index.Settings createSettings()
      Specified by:
      createSettings in interface org.springframework.data.elasticsearch.core.IndexOperations
    • createSettings

      public org.springframework.data.elasticsearch.core.index.Settings createSettings(Class<?> clazz)
      Specified by:
      createSettings in interface org.springframework.data.elasticsearch.core.IndexOperations
    • getSettings

      public org.springframework.data.elasticsearch.core.index.Settings getSettings()
      Specified by:
      getSettings in interface org.springframework.data.elasticsearch.core.IndexOperations
    • getSettings

      public org.springframework.data.elasticsearch.core.index.Settings getSettings(boolean includeDefaults)
      Specified by:
      getSettings in interface org.springframework.data.elasticsearch.core.IndexOperations
    • alias

      public boolean alias(org.springframework.data.elasticsearch.core.index.AliasActions aliasActions)
      Specified by:
      alias in interface org.springframework.data.elasticsearch.core.IndexOperations
    • getAliases

      public Map<String,Set<org.springframework.data.elasticsearch.core.index.AliasData>> getAliases(String... aliasNames)
      Specified by:
      getAliases in interface org.springframework.data.elasticsearch.core.IndexOperations
    • getAliasesForIndex

      public Map<String,Set<org.springframework.data.elasticsearch.core.index.AliasData>> getAliasesForIndex(String... indexNames)
      Specified by:
      getAliasesForIndex in interface org.springframework.data.elasticsearch.core.IndexOperations
    • putTemplate

      public boolean putTemplate(org.springframework.data.elasticsearch.core.index.PutTemplateRequest putTemplateRequest)
      Specified by:
      putTemplate in interface org.springframework.data.elasticsearch.core.IndexOperations
    • getTemplate

      public org.springframework.data.elasticsearch.core.index.TemplateData getTemplate(org.springframework.data.elasticsearch.core.index.GetTemplateRequest getTemplateRequest)
      Specified by:
      getTemplate in interface org.springframework.data.elasticsearch.core.IndexOperations
    • existsTemplate

      public boolean existsTemplate(org.springframework.data.elasticsearch.core.index.ExistsTemplateRequest existsTemplateRequest)
      Specified by:
      existsTemplate in interface org.springframework.data.elasticsearch.core.IndexOperations
    • deleteTemplate

      public boolean deleteTemplate(org.springframework.data.elasticsearch.core.index.DeleteTemplateRequest deleteTemplateRequest)
      Specified by:
      deleteTemplate in interface org.springframework.data.elasticsearch.core.IndexOperations
    • putIndexTemplate

      public boolean putIndexTemplate(org.springframework.data.elasticsearch.core.index.PutIndexTemplateRequest putIndexTemplateRequest)
      Specified by:
      putIndexTemplate in interface org.springframework.data.elasticsearch.core.IndexOperations
    • existsIndexTemplate

      public boolean existsIndexTemplate(org.springframework.data.elasticsearch.core.index.ExistsIndexTemplateRequest existsIndexTemplateRequest)
      Specified by:
      existsIndexTemplate in interface org.springframework.data.elasticsearch.core.IndexOperations
    • getIndexTemplate

      public List<org.springframework.data.elasticsearch.core.index.TemplateResponse> getIndexTemplate(org.springframework.data.elasticsearch.core.index.GetIndexTemplateRequest getIndexTemplateRequest)
      Specified by:
      getIndexTemplate in interface org.springframework.data.elasticsearch.core.IndexOperations
    • deleteIndexTemplate

      public boolean deleteIndexTemplate(org.springframework.data.elasticsearch.core.index.DeleteIndexTemplateRequest deleteIndexTemplateRequest)
      Specified by:
      deleteIndexTemplate in interface org.springframework.data.elasticsearch.core.IndexOperations
    • putComponentTemplate

      public boolean putComponentTemplate(org.springframework.data.elasticsearch.core.index.PutComponentTemplateRequest putComponentTemplateRequest)
      Specified by:
      putComponentTemplate in interface org.springframework.data.elasticsearch.core.IndexOperations
    • existsComponentTemplate

      public boolean existsComponentTemplate(org.springframework.data.elasticsearch.core.index.ExistsComponentTemplateRequest existsComponentTemplateRequest)
      Specified by:
      existsComponentTemplate in interface org.springframework.data.elasticsearch.core.IndexOperations
    • getComponentTemplate

      public List<org.springframework.data.elasticsearch.core.index.TemplateResponse> getComponentTemplate(org.springframework.data.elasticsearch.core.index.GetComponentTemplateRequest getComponentTemplateRequest)
      Specified by:
      getComponentTemplate in interface org.springframework.data.elasticsearch.core.IndexOperations
    • deleteComponentTemplate

      public boolean deleteComponentTemplate(org.springframework.data.elasticsearch.core.index.DeleteComponentTemplateRequest deleteComponentTemplateRequest)
      Specified by:
      deleteComponentTemplate in interface org.springframework.data.elasticsearch.core.IndexOperations
    • getInformation

      public List<org.springframework.data.elasticsearch.core.IndexInformation> getInformation(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates indexCoordinates)
      Specified by:
      getInformation in interface org.springframework.data.elasticsearch.core.IndexOperations
    • getIndexCoordinates

      public org.springframework.data.elasticsearch.core.mapping.IndexCoordinates getIndexCoordinates()
      Specified by:
      getIndexCoordinates in interface org.springframework.data.elasticsearch.core.IndexOperations
    • getIndexCoordinatesFor

      public org.springframework.data.elasticsearch.core.mapping.IndexCoordinates getIndexCoordinatesFor(Class<?> clazz)