Package io.jmix.searchopensearch.index
Interface OpenSearchIndexSettingsConfigurer
- All Superinterfaces:
IndexSettingsConfigurer<OpenSearchIndexSettingsConfigurationContext>
- All Known Implementing Classes:
OpenSearchExtendedIndexSettingsConfigurer
public interface OpenSearchIndexSettingsConfigurer
extends IndexSettingsConfigurer<OpenSearchIndexSettingsConfigurationContext>
Base interface for configurers of OpenSearch index settings.
Create Spring Bean that implements this interface.
Index settings can be configured inside
configure(OpenSearchIndexSettingsConfigurationContext)
by using
settings and analysis builders acquired from OpenSearchIndexSettingsConfigurationContext
.
Example:
@Component("demo_OpenSearchIndexSettingsConfigurer") public class DemoOpenSearchIndexSettingsConfigurer implements OpenSearchIndexSettingsConfigurer { @Override public void configure(OpenSearchIndexSettingsConfigurationContext 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<OpenSearchIndexSettingsConfigurationContext>
- Parameters:
context
- configuration context
-