Interface IIndexOperationsManager
- Namespace
- Excalibur.Data.ElasticSearch.IndexManagement
- Assembly
- Excalibur.Data.ElasticSearch.dll
Provides functionality for dynamic index operations including creation, optimization, and health monitoring.
public interface IIndexOperationsManager
- Extension Methods
Methods
CreateIndexAsync(string, IndexConfiguration, CancellationToken)
Creates an index with the specified configuration.
Task<bool> CreateIndexAsync(string indexName, IndexConfiguration configuration, CancellationToken cancellationToken)
Parameters
indexNamestringThe name of the index to create.
configurationIndexConfigurationThe index configuration settings.
cancellationTokenCancellationTokenThe cancellation token to cancel the operation if required.
Returns
- Task<bool>
A Task<TResult> indicating whether the operation was successful.
DeleteIndexAsync(string, CancellationToken)
Deletes an index from Elasticsearch.
Task<bool> DeleteIndexAsync(string indexName, CancellationToken cancellationToken)
Parameters
indexNamestringThe name of the index to delete.
cancellationTokenCancellationTokenThe cancellation token to cancel the operation if required.
Returns
- Task<bool>
A Task<TResult> indicating whether the operation was successful.
GetIndexHealthAsync(string?, CancellationToken)
Gets health information for the specified indices.
Task<IEnumerable<IndexHealthStatus>> GetIndexHealthAsync(string? indexPattern, CancellationToken cancellationToken)
Parameters
indexPatternstringThe index pattern to check. If null, checks all indices.
cancellationTokenCancellationTokenThe cancellation token to cancel the operation if required.
Returns
- Task<IEnumerable<IndexHealthStatus>>
A Task<TResult> containing index health information.
IndexExistsAsync(string, CancellationToken)
Checks if an index exists in Elasticsearch.
Task<bool> IndexExistsAsync(string indexName, CancellationToken cancellationToken)
Parameters
indexNamestringThe name of the index to check.
cancellationTokenCancellationTokenThe cancellation token to cancel the operation if required.
Returns
- Task<bool>
A Task<TResult> indicating whether the index exists.
UpdateIndexSettingsAsync(string, JsonElement, CancellationToken)
Updates index settings dynamically.
Task<bool> UpdateIndexSettingsAsync(string indexName, JsonElement settingsJson, CancellationToken cancellationToken)
Parameters
indexNamestringThe name of the index to update.
settingsJsonJsonElementThe new settings to apply as opaque JSON.
cancellationTokenCancellationTokenThe cancellation token to cancel the operation if required.
Returns
- Task<bool>
A Task<TResult> indicating whether the operation was successful.