Class OpenSearchIndexManager
java.lang.Object
io.jmix.search.index.impl.BaseIndexManager<org.opensearch.client.opensearch.indices.IndexState,org.opensearch.client.opensearch.indices.IndexSettings,org.opensearch.client.json.JsonpSerializable>
io.jmix.searchopensearch.index.impl.OpenSearchIndexManager
- All Implemented Interfaces:
IndexManager
public class OpenSearchIndexManager
extends BaseIndexManager<org.opensearch.client.opensearch.indices.IndexState,org.opensearch.client.opensearch.indices.IndexSettings,org.opensearch.client.json.JsonpSerializable>
Implementation for OpenSearch
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.opensearch.client.opensearch.OpenSearchClient
protected final OpenSearchIndexSettingsProvider
protected final com.fasterxml.jackson.databind.ObjectMapper
protected final OpenSearchPutMappingRequestBuilder
Fields inherited from class io.jmix.search.index.impl.BaseIndexManager
indexConfigurationComparator, indexConfigurationManager, indexStateRegistry, indexStateResolver, searchProperties
-
Constructor Summary
ConstructorDescriptionOpenSearchIndexManager
(org.opensearch.client.opensearch.OpenSearchClient client, IndexStateRegistry indexStateRegistry, IndexConfigurationManager indexConfigurationManager, SearchProperties searchProperties, OpenSearchIndexSettingsProvider indexSettingsProcessor, OpenSearchIndexConfigurationComparator configurationComparator, OpenSearchIndexStateResolver metadataResolver, OpenSearchPutMappingRequestBuilder putMappingRequestBuilder) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.opensearch.client.opensearch._types.mapping.TypeMapping
buildMapping
(IndexConfiguration indexConfiguration) protected org.opensearch.client.opensearch.indices.IndexSettings
buildSettings
(IndexConfiguration indexConfiguration) boolean
createIndex
(IndexConfiguration indexConfiguration) Creates index if not exists using providedIndexConfiguration
.boolean
Drops index by name.com.fasterxml.jackson.databind.node.ObjectNode
getIndexMetadata
(String indexName) Requests info about index from server.boolean
isIndexExist
(String indexName) Checks if index exists.boolean
putMapping
(String indexName, IndexMappingConfiguration mappingConfiguration) Saves mapping to index on the search server or servers cluster.Methods inherited from class io.jmix.search.index.impl.BaseIndexManager
handleMissingIndex, recreateIndex, recreateIndexes, recreateIndexes, recreateIrrelevantIndex, synchronizeIndexSchema, synchronizeIndexSchema, synchronizeIndexSchemas, synchronizeIndexSchemas, updateIndexConfiguration, validateIndex, validateIndexes, validateIndexes
-
Field Details
-
client
protected final org.opensearch.client.opensearch.OpenSearchClient client -
indexSettingsProcessor
-
putMappingRequestBuilder
-
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, OpenSearchIndexConfigurationComparator configurationComparator, OpenSearchIndexStateResolver metadataResolver, OpenSearchPutMappingRequestBuilder putMappingRequestBuilder)
-
-
Method Details
-
createIndex
Description copied from interface:IndexManager
Creates index if not exists using providedIndexConfiguration
.- Parameters:
indexConfiguration
- index configuration- Returns:
- true if index was successfully created, false otherwise
-
dropIndex
Description copied from interface:IndexManager
Drops index by name.- Parameters:
indexName
- index name- Returns:
- true if index was successfully dropped, false otherwise
-
isIndexExist
Description copied from interface:IndexManager
Checks if index exists.- Parameters:
indexName
- index name- Returns:
- true if index exists, false otherwise
-
getIndexMetadata
Description copied from interface:IndexManager
Requests info about index from server.- Parameters:
indexName
- index name- Returns:
- response as Json
-
putMapping
Description copied from interface:IndexManager
Saves mapping to index on the search server or servers cluster.- Parameters:
indexName
- name of the index for saving mappingmappingConfiguration
- mapping for saving to configuration of the specified index- Returns:
- true if saving process was performed successfully.
-
buildMapping
protected org.opensearch.client.opensearch._types.mapping.TypeMapping buildMapping(IndexConfiguration indexConfiguration) -
buildSettings
protected org.opensearch.client.opensearch.indices.IndexSettings buildSettings(IndexConfiguration indexConfiguration)
-