Package io.jmix.search.index
Interface IndexManager
- All Known Implementing Classes:
- BaseIndexManager,- ElasticsearchIndexManager,- OpenSearchIndexManager
public interface IndexManager
Provides functionality for index management.
- 
Method SummaryModifier and TypeMethodDescriptionbooleancreateIndex(IndexConfiguration indexConfiguration) Creates index if not exists using providedIndexConfiguration.booleanDrops index by name.com.fasterxml.jackson.databind.node.ObjectNodegetIndexMetadata(String indexName) Requests info about index from server.booleanisIndexExist(String indexName) Checks if index exists.booleanputMapping(String indexName, IndexMappingConfiguration mapping) Saves mapping to index on the search server or servers cluster.booleanrecreateIndex(IndexConfiguration indexConfiguration) Drops and creates search index using providedIndexConfiguration.Drops and creates all search indexes.recreateIndexes(Collection<IndexConfiguration> indexConfigurations) Drops and creates search indexes using provided collection ofIndexConfiguration.synchronizeIndexSchema(IndexConfiguration indexConfiguration) Synchronizes schema of search index for providedIndexConfiguration.Synchronizes schemas of all search indexes defined in application.synchronizeIndexSchemas(Collection<IndexConfiguration> indexConfigurations) Synchronizes schemas of search indexes for provided collection ofIndexConfiguration.validateIndex(IndexConfiguration indexConfiguration) Validates current state of index schema.Validates current state of schema of all search indexes defined in application.validateIndexes(Collection<IndexConfiguration> indexConfigurations) Validates current state of index schema related to provided collection ofIndexConfiguration.
- 
Method Details- 
createIndexCreates index if not exists using providedIndexConfiguration.- Parameters:
- indexConfiguration- index configuration
- Returns:
- true if index was successfully created, false otherwise
 
- 
dropIndexDrops index by name.- Parameters:
- indexName- index name
- Returns:
- true if index was successfully dropped, false otherwise
 
- 
recreateIndexesMap<IndexConfiguration,Boolean> recreateIndexes()Drops and creates all search indexes.- Returns:
- Map with operation result per every index configuration
 
- 
recreateIndexesDrops and creates search indexes using provided collection ofIndexConfiguration.- Parameters:
- indexConfigurations- index configurations
- Returns:
- Map with operation result per every index configuration
 
- 
recreateIndexDrops and creates search index using providedIndexConfiguration.- Parameters:
- indexConfiguration- index configuration
- Returns:
- true if index was successfully recreated, false otherwise
 
- 
isIndexExistChecks if index exists.- Parameters:
- indexName- index name
- Returns:
- true if index exists, false otherwise
 
- 
validateIndexesMap<IndexConfiguration,IndexValidationStatus> validateIndexes()Validates current state of schema of all search indexes defined in application.- Returns:
- IndexValidationStatusper each- IndexConfiguration
 
- 
validateIndexesMap<IndexConfiguration,IndexValidationStatus> validateIndexes(Collection<IndexConfiguration> indexConfigurations) Validates current state of index schema related to provided collection ofIndexConfiguration.- Parameters:
- indexConfigurations- actual configurations
- Returns:
- IndexValidationStatusper each- IndexConfiguration
 
- 
validateIndexValidates current state of index schema.- Parameters:
- indexConfiguration- actual configuration
- Returns:
- IndexValidationStatus
 
- 
getIndexMetadataRequests info about index from server.- Parameters:
- indexName- index name
- Returns:
- response as Json
 
- 
synchronizeIndexSchemasMap<IndexConfiguration,IndexSynchronizationStatus> synchronizeIndexSchemas()Synchronizes schemas of all search indexes defined in application.- Returns:
- IndexSynchronizationStatusper each- IndexConfiguration
 
- 
synchronizeIndexSchemasMap<IndexConfiguration,IndexSynchronizationStatus> synchronizeIndexSchemas(Collection<IndexConfiguration> indexConfigurations) Synchronizes schemas of search indexes for provided collection ofIndexConfiguration.- Parameters:
- indexConfigurations- actual index configurations
- Returns:
- IndexSynchronizationStatusper each- IndexConfiguration
 
- 
synchronizeIndexSchemaSynchronizes schema of search index for providedIndexConfiguration.It tries to update schema to the actual state according to IndexSchemaManagementStrategydefined by 'jmix.search.indexSchemaManagementStrategy' application property.- Parameters:
- indexConfiguration- actual index configuration
- Returns:
- IndexSynchronizationStatus
 
- 
putMappingSaves mapping to index on the search server or servers cluster.- Parameters:
- indexName- name of the index for saving mapping
- mapping- mapping for saving to configuration of the specified index
- Returns:
- true if saving process was performed successfully.
 
 
-