Package io.jmix.searchopensearch.index
Class OpenSearchIndexSettingsProvider
java.lang.Object
io.jmix.searchopensearch.index.OpenSearchIndexSettingsProvider
@Component("search_OpenSearchIndexSettingsProvider")
public class OpenSearchIndexSettingsProvider
extends Object
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classIndex settings of one metadata generation: the context configured by the configurers and the settings computed from it, cached by entity class. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.opensearch.client.opensearch.OpenSearchClientprotected final List<OpenSearchIndexSettingsConfigurer> protected MetadataGenerationManagerprotected final com.fasterxml.jackson.databind.ObjectMapperprotected final GenerationStateStore<OpenSearchIndexSettingsProvider.State> protected final List<OpenSearchIndexSettingsConfigurer> -
Constructor Summary
ConstructorsConstructorDescriptionOpenSearchIndexSettingsProvider(List<OpenSearchIndexSettingsConfigurer> configurers, org.opensearch.client.opensearch.OpenSearchClient client) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.opensearch.client.opensearch.indices.IndexSettingsAnalysiscopyAnalysisSettings(org.opensearch.client.opensearch.indices.IndexSettingsAnalysis source) protected org.opensearch.client.opensearch.indices.IndexSettingscopyIndexSettings(org.opensearch.client.opensearch.indices.IndexSettings source) protected org.opensearch.client.opensearch.indices.IndexSettingsAnalysisdeserializeAnalysisSettings(String serializedSettings) protected org.opensearch.client.opensearch.indices.IndexSettingsdeserializeIndexSettings(String serializedSettings) org.opensearch.client.opensearch.indices.IndexSettingsgetSettingsForIndex(IndexConfiguration indexConfiguration) protected OpenSearchIndexSettingsProvider.StategetState()Returns the settings state of the metadata generation pinned or current for the calling thread.protected booleanisEmptyAnalysisSettings(org.opensearch.client.opensearch.indices.IndexSettingsAnalysis settings) protected booleanisEmptySettings(org.opensearch.client.opensearch.indices.IndexSettings settings) protected booleanisNewApiUsed(Class<?> entityClass) voidRemoves index settings cached for a retired metadata generation.protected voidprepareConfigurers(List<OpenSearchIndexSettingsConfigurer> configurers) protected StringserializeJsonpSerializable(org.opensearch.client.json.JsonpSerializable object) 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)
-
Field Details
-
client
protected final org.opensearch.client.opensearch.OpenSearchClient client -
customConfigurers
-
systemConfigurers
-
stateStore
-
objectMapper
protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper -
metadataGenerationManager
-
-
Constructor Details
-
OpenSearchIndexSettingsProvider
@Autowired public OpenSearchIndexSettingsProvider(List<OpenSearchIndexSettingsConfigurer> configurers, org.opensearch.client.opensearch.OpenSearchClient client)
-
-
Method Details
-
getSettingsForIndex
public org.opensearch.client.opensearch.indices.IndexSettings getSettingsForIndex(IndexConfiguration indexConfiguration) -
onMetadataGenerationRetired
Removes index settings cached for a retired metadata generation.- Parameters:
event- retired-generation event
-
getState
Returns the settings state of the metadata generation pinned or current for the calling thread. The configurers are run once per generation, so they see the index configurations and entity classes of that generation. -
configureContext
-
prepareConfigurers
-
copyIndexSettings
protected org.opensearch.client.opensearch.indices.IndexSettings copyIndexSettings(org.opensearch.client.opensearch.indices.IndexSettings source) -
copyAnalysisSettings
protected org.opensearch.client.opensearch.indices.IndexSettingsAnalysis copyAnalysisSettings(org.opensearch.client.opensearch.indices.IndexSettingsAnalysis source) -
serializeJsonpSerializable
-
deserializeIndexSettings
protected org.opensearch.client.opensearch.indices.IndexSettings deserializeIndexSettings(String serializedSettings) -
deserializeAnalysisSettings
protected org.opensearch.client.opensearch.indices.IndexSettingsAnalysis deserializeAnalysisSettings(String serializedSettings) -
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) -
isNewApiUsed
-
isEmptySettings
protected boolean isEmptySettings(org.opensearch.client.opensearch.indices.IndexSettings settings) -
isEmptyAnalysisSettings
protected boolean isEmptyAnalysisSettings(org.opensearch.client.opensearch.indices.IndexSettingsAnalysis settings)
-