Interface IndexSettingsConfigurer


public interface IndexSettingsConfigurer
Base interface for configurers of Elasticsearch index settings.

Create Spring Bean that implements this interface. Index settings can be configured inside configure(IndexSettingsConfigurationContext).

See IndexSettingsConfigurationContext.

Example:

Settings of all search indexes will have common values "index.max_result_window"=15000 and "index.mapping.total_fields.limit"=1500 but settings of index related to entity class 'DemoEntity' will have common value "index.max_result_window"=15000 and explicit value "index.mapping.total_fields.limit"=2000.

Configurer:

 @Component("demo_IndexSettingsConfigurer")
 public class DemoIndexSettingsConfigurer implements IndexSettingsConfigurer {

     @Override
     public void configure(@Nonnull IndexSettingsConfigurationContext context) {
         context.getCommonSettingsBuilder()
                 .put("index.max_result_window", 15000)
                 .put("index.mapping.total_fields.limit", 1500);

         context.getEntitySettingsBuilder(DemoEntity.class)
                 .put("index.mapping.total_fields.limit", 2000);
     }
 }