Interface ElasticsearchIndexSettingsConfigurer

All Superinterfaces:
IndexSettingsConfigurer<ElasticsearchIndexSettingsConfigurationContext>
All Known Implementing Classes:
ElasticsearchExtendedIndexSettingsConfigurer

public interface ElasticsearchIndexSettingsConfigurer extends IndexSettingsConfigurer<ElasticsearchIndexSettingsConfigurationContext>
Base interface for configurers of Elasticsearch index settings.

Create Spring Bean that implements this interface. Index settings can be configured inside configure(ElasticsearchIndexSettingsConfigurationContext) by using settings and analysis builders acquired from ElasticsearchIndexSettingsConfigurationContext.

Example:

 @Component("demo_ElasticsearchIndexSettingsConfigurer")
 public class DemoElasticsearchIndexSettingsConfigurer implements ElasticsearchIndexSettingsConfigurer {

     @Override
     public void configure(ElasticsearchIndexSettingsConfigurationContext context) {
         context.getCommonIndexSettingsBuilder().maxResultWindow(15000);
         context.getEntityIndexSettingsBuilder(Person.class).maxResultWindow(20000);

         context.getCommonAnalysisBuilder().analyzer("customized_standard", analyzerBuilder ->
                 analyzerBuilder.standard(stdAnalyzerBuilder ->
                         stdAnalyzerBuilder.maxTokenLength(100)
                 )
         );
         context.getEntityAnalysisBuilder(Person.class).analyzer("customized_standard", analyzerBuilder ->
                 analyzerBuilder.standard(stdAnalyzerBuilder ->
                         stdAnalyzerBuilder.maxTokenLength(150) *
                 )
         );
     }
 }