Package io.jmix.search.index.impl
Class NoopIndexManager
java.lang.Object
io.jmix.search.index.impl.NoopIndexManager
- All Implemented Interfaces:
IndexManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.fasterxml.jackson.databind.ObjectMapper -
Constructor Summary
Constructors -
Method Summary
Modifier 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.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.
-
Field Details
-
objectMapper
protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Details
-
NoopIndexManager
public NoopIndexManager()
-
-
Method Details
-
createIndex
Description copied from interface:IndexManagerCreates index if not exists using providedIndexConfiguration.- Specified by:
createIndexin interfaceIndexManager- Parameters:
indexConfiguration- index configuration- Returns:
- true if index was successfully created, false otherwise
-
dropIndex
Description copied from interface:IndexManagerDrops index by name.- Specified by:
dropIndexin interfaceIndexManager- Parameters:
indexName- index name- Returns:
- true if index was successfully dropped, false otherwise
-
recreateIndexes
Description copied from interface:IndexManagerDrops and creates all search indexes.- Specified by:
recreateIndexesin interfaceIndexManager- Returns:
- Map with operation result per every index configuration
-
recreateIndexes
public Map<IndexConfiguration,Boolean> recreateIndexes(Collection<IndexConfiguration> indexConfigurations) Description copied from interface:IndexManagerDrops and creates search indexes using provided collection ofIndexConfiguration.- Specified by:
recreateIndexesin interfaceIndexManager- Parameters:
indexConfigurations- index configurations- Returns:
- Map with operation result per every index configuration
-
recreateIndex
Description copied from interface:IndexManagerDrops and creates search index using providedIndexConfiguration.- Specified by:
recreateIndexin interfaceIndexManager- Parameters:
indexConfiguration- index configuration- Returns:
- true if index was successfully recreated, false otherwise
-
isIndexExist
Description copied from interface:IndexManagerChecks if index exists.- Specified by:
isIndexExistin interfaceIndexManager- Parameters:
indexName- index name- Returns:
- true if index exists, false otherwise
-
validateIndexes
Description copied from interface:IndexManagerValidates current state of schema of all search indexes defined in application.- Specified by:
validateIndexesin interfaceIndexManager- Returns:
IndexValidationStatusper eachIndexConfiguration
-
validateIndexes
public Map<IndexConfiguration,IndexValidationStatus> validateIndexes(Collection<IndexConfiguration> indexConfigurations) Description copied from interface:IndexManagerValidates current state of index schema related to provided collection ofIndexConfiguration.- Specified by:
validateIndexesin interfaceIndexManager- Parameters:
indexConfigurations- actual configurations- Returns:
IndexValidationStatusper eachIndexConfiguration
-
validateIndex
Description copied from interface:IndexManagerValidates current state of index schema.- Specified by:
validateIndexin interfaceIndexManager- Parameters:
indexConfiguration- actual configuration- Returns:
IndexValidationStatus
-
getIndexMetadata
Description copied from interface:IndexManagerRequests info about index from server.- Specified by:
getIndexMetadatain interfaceIndexManager- Parameters:
indexName- index name- Returns:
- response as Json
-
synchronizeIndexSchemas
Description copied from interface:IndexManagerSynchronizes schemas of all search indexes defined in application.- Specified by:
synchronizeIndexSchemasin interfaceIndexManager- Returns:
IndexSynchronizationStatusper eachIndexConfiguration
-
synchronizeIndexSchemas
public Map<IndexConfiguration,IndexSynchronizationStatus> synchronizeIndexSchemas(Collection<IndexConfiguration> indexConfigurations) Description copied from interface:IndexManagerSynchronizes schemas of search indexes for provided collection ofIndexConfiguration.- Specified by:
synchronizeIndexSchemasin interfaceIndexManager- Parameters:
indexConfigurations- actual index configurations- Returns:
IndexSynchronizationStatusper eachIndexConfiguration
-
synchronizeIndexSchema
Description copied from interface:IndexManagerSynchronizes schema of search index for providedIndexConfiguration.It tries to update schema to the actual state according to
IndexSchemaManagementStrategydefined by 'jmix.search.indexSchemaManagementStrategy' application property.- Specified by:
synchronizeIndexSchemain interfaceIndexManager- Parameters:
indexConfiguration- actual index configuration- Returns:
IndexSynchronizationStatus
-