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) * ) ); } }
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Configures settings via builders acquired from provided context.Methods inherited from interface io.jmix.search.index.IndexSettingsConfigurer
isSystem
-
Method Details
-
configure
Description copied from interface:IndexSettingsConfigurer
Configures settings via builders acquired from provided context.- Specified by:
configure
in interfaceIndexSettingsConfigurer<ElasticsearchIndexSettingsConfigurationContext>
- Parameters:
context
- configuration context
-