Class BaseIndexSettingsConfigurationContext<T,A>

java.lang.Object
io.jmix.search.index.BaseIndexSettingsConfigurationContext<T,A>
Direct Known Subclasses:
ElasticsearchIndexSettingsConfigurationContext, OpenSearchIndexSettingsConfigurationContext

public class BaseIndexSettingsConfigurationContext<T,A> extends Object
Class provides logic of index settings and analysis configuration.

NOTE: Usage of deprecated api (getCommonSettingsBuilder() and getEntitySettingsBuilder(Class)) will be ignored if any of the actual API above is used or ExtendedSearch is applied

NOTE: do not call .build() method of acquired builders within your configurer.

  • Field Details

    • commonIndexSettingsBuilder

      protected final T commonIndexSettingsBuilder
    • commonAnalysisBuilder

      protected final A commonAnalysisBuilder
    • specificIndexSettingsBuilders

      protected final Map<Class<?>,T> specificIndexSettingsBuilders
    • specificAnalysisBuilders

      protected final Map<Class<?>,A> specificAnalysisBuilders
    • indexSettingsBuilderGenerator

      protected final Supplier<T> indexSettingsBuilderGenerator
    • analysisBuilderGenerator

      protected final Supplier<A> analysisBuilderGenerator
    • commonSettingsBuilder

      protected final T commonSettingsBuilder
    • specificSettingsBuilders

      protected final Map<Class<?>,T> specificSettingsBuilders
  • Constructor Details

    • BaseIndexSettingsConfigurationContext

      public BaseIndexSettingsConfigurationContext(Supplier<T> indexSettingsBuilderGenerator, Supplier<A> analysisBuilderGenerator)
  • Method Details

    • getCommonIndexSettingsBuilder

      public T getCommonIndexSettingsBuilder()
      Provides builder to configure index settings for all indexes.
      Returns:
      Index settings builder
    • getCommonAnalysisBuilder

      public A getCommonAnalysisBuilder()
      Provides builder to configure analysis settings for all indexes.
      Returns:
      Analysis settings builder
    • getEntityIndexSettingsBuilder

      public T getEntityIndexSettingsBuilder(Class<?> entityClass)
      Provides builder to configure index settings for index related to provided entity.
      Parameters:
      entityClass - entity class
      Returns:
      Index settings builder
    • getEntityAnalysisBuilder

      public A getEntityAnalysisBuilder(Class<?> entityClass)
      Provides builder to configure analysis settings for index related to provided entity.
      Parameters:
      entityClass - entity class
      Returns:
      Analysis settings builder
    • getAllSpecificIndexSettingsBuilders

      public Map<Class<?>,T> getAllSpecificIndexSettingsBuilders()
    • getAllSpecificAnalysisBuilders

      public Map<Class<?>,A> getAllSpecificAnalysisBuilders()
    • getCommonSettingsBuilder

      @Deprecated(since="2.4", forRemoval=true) public T getCommonSettingsBuilder()
      Deprecated, for removal: This API element is subject to removal in a future version.
      This settings will not work correctly with ExtendedSearch. Use getCommonIndexSettingsBuilder() to configure index settings and getCommonAnalysisBuilder() to configure analysis settings.
      Provides builder to set settings for all search indexes.
      Returns:
      Index settings builder
    • getEntitySettingsBuilder

      @Deprecated(since="2.4", forRemoval=true) public T getEntitySettingsBuilder(Class<?> entityClass)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This settings will not work correctly with ExtendedSearch. Use getCommonIndexSettingsBuilder() to configure index settings and getCommonAnalysisBuilder() to configure analysis settings.
      Provides builder to set settings for index related to provided entity. All necessary settings should be configured explicitly - they will not be merged with the common ones.
      Parameters:
      entityClass - entity class
      Returns:
      Index settings builder
    • getAllSpecificSettingsBuilders

      @Deprecated(since="2.4", forRemoval=true) public Map<Class<?>,T> getAllSpecificSettingsBuilders()
      Deprecated, for removal: This API element is subject to removal in a future version.