Class OpenSearchIndexManager
java.lang.Object
io.jmix.search.index.impl.BaseIndexManager
io.jmix.searchopensearch.index.impl.OpenSearchIndexManager
- All Implemented Interfaces:
IndexManager
Implementation for OpenSearch
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.opensearch.client.opensearch.OpenSearchClientprotected final OpenSearchIndexSettingsProviderprotected final com.fasterxml.jackson.databind.ObjectMapperFields inherited from class io.jmix.search.index.impl.BaseIndexManager
indexConfigurationManager, indexStateRegistry, MAP_TYPE_REF, searchProperties -
Constructor Summary
ConstructorsConstructorDescriptionOpenSearchIndexManager(org.opensearch.client.opensearch.OpenSearchClient client, IndexStateRegistry indexStateRegistry, IndexConfigurationManager indexConfigurationManager, SearchProperties searchProperties, OpenSearchIndexSettingsProvider indexSettingsProcessor) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.opensearch.client.opensearch._types.mapping.TypeMappingbuildMapping(IndexConfiguration indexConfiguration) protected org.opensearch.client.opensearch.indices.IndexSettingsbuildSettings(IndexConfiguration indexConfiguration) booleancreateIndex(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.protected org.opensearch.client.opensearch.indices.IndexStategetIndexMetadataInternal(String indexName) getIndexMetadataMapInternal(String indexName) protected booleanisIndexActual(IndexConfiguration indexConfiguration) booleanisIndexExist(String indexName) Checks if index exists.protected booleanisIndexMappingActual(IndexConfiguration indexConfiguration, org.opensearch.client.opensearch.indices.IndexState currentIndexState) protected booleanisIndexSettingsActual(IndexConfiguration indexConfiguration, org.opensearch.client.opensearch.indices.IndexState currentIndexState) protected com.fasterxml.jackson.databind.JsonNodetoJsonNode(org.opensearch.client.json.JsonpSerializable object) protected com.fasterxml.jackson.databind.node.ObjectNodetoObjectNode(org.opensearch.client.json.JsonpSerializable object) Methods inherited from class io.jmix.search.index.impl.BaseIndexManager
handleIrrelevantIndex, handleMissingIndex, nodeContains, recreateIndex, recreateIndexes, recreateIndexes, synchronizeIndexSchema, synchronizeIndexSchema, synchronizeIndexSchemas, synchronizeIndexSchemas, validateIndex, validateIndexes, validateIndexes
-
Field Details
-
client
protected final org.opensearch.client.opensearch.OpenSearchClient client -
indexSettingsProcessor
-
objectMapper
protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Details
-
OpenSearchIndexManager
public OpenSearchIndexManager(org.opensearch.client.opensearch.OpenSearchClient client, IndexStateRegistry indexStateRegistry, IndexConfigurationManager indexConfigurationManager, SearchProperties searchProperties, OpenSearchIndexSettingsProvider indexSettingsProcessor)
-
-
Method Details
-
createIndex
Description copied from interface:IndexManagerCreates index if not exists using providedIndexConfiguration.- Parameters:
indexConfiguration- index configuration- Returns:
- true if index was successfully created, false otherwise
-
dropIndex
Description copied from interface:IndexManagerDrops index by name.- Parameters:
indexName- index name- Returns:
- true if index was successfully dropped, false otherwise
-
isIndexExist
Description copied from interface:IndexManagerChecks if index exists.- Parameters:
indexName- index name- Returns:
- true if index exists, false otherwise
-
getIndexMetadata
Description copied from interface:IndexManagerRequests info about index from server.- Parameters:
indexName- index name- Returns:
- response as Json
-
isIndexActual
- Specified by:
isIndexActualin classBaseIndexManager
-
buildMapping
protected org.opensearch.client.opensearch._types.mapping.TypeMapping buildMapping(IndexConfiguration indexConfiguration) -
buildSettings
protected org.opensearch.client.opensearch.indices.IndexSettings buildSettings(IndexConfiguration indexConfiguration) -
toJsonNode
protected com.fasterxml.jackson.databind.JsonNode toJsonNode(org.opensearch.client.json.JsonpSerializable object) -
toObjectNode
protected com.fasterxml.jackson.databind.node.ObjectNode toObjectNode(org.opensearch.client.json.JsonpSerializable object) -
getIndexMetadataMapInternal
-
getIndexMetadataInternal
@Nullable protected org.opensearch.client.opensearch.indices.IndexState getIndexMetadataInternal(String indexName) -
isIndexMappingActual
protected boolean isIndexMappingActual(IndexConfiguration indexConfiguration, org.opensearch.client.opensearch.indices.IndexState currentIndexState) -
isIndexSettingsActual
protected boolean isIndexSettingsActual(IndexConfiguration indexConfiguration, org.opensearch.client.opensearch.indices.IndexState currentIndexState)
-