Class ElasticSearchProjectionStoreOptions
- Namespace
- Excalibur.Data.ElasticSearch.Projections
- Assembly
- Excalibur.Data.ElasticSearch.dll
Configuration options for the ElasticSearch projection store.
public sealed class ElasticSearchProjectionStoreOptions
- Inheritance
-
ElasticSearchProjectionStoreOptions
- Inherited Members
Remarks
Supports connection configuration for ElasticSearch clusters with standard Elastic.Clients.Elasticsearch settings. Each projection type gets its own dedicated index for optimal query performance and mapping isolation.
Properties
Auth
Gets or sets the authentication options for the ElasticSearch connection.
public ElasticSearchProjectionAuthOptions Auth { get; set; }
Property Value
- ElasticSearchProjectionAuthOptions
Authentication options including username/password and API key.
ConnectionPoolType
Gets or sets the connection pool type for multi-node clusters.
public ConnectionPoolType ConnectionPoolType { get; set; }
Property Value
- ConnectionPoolType
Defaults to Static.
Remarks
Only used when NodeUris is set with one or more URIs.
EnableDebugMode
Gets or sets a value indicating whether to disable direct streaming.
public bool EnableDebugMode { get; set; }
Property Value
Remarks
When enabled, request and response bodies are buffered for debugging purposes. Should be disabled in production for performance.
Index
Gets or sets the index configuration options for projection indices.
public ElasticSearchProjectionIndexOptions Index { get; set; }
Property Value
- ElasticSearchProjectionIndexOptions
Index naming, shard/replica, refresh, and mapping-convention options.
NodeUri
Gets or sets the ElasticSearch node URI for single-node configuration.
public string NodeUri { get; set; }
Property Value
Remarks
Ignored when NodeUris is set with one or more URIs. Set this or NodeUris: there is no default, so a cluster nobody configured is refused at start-up instead of being silently addressed on the local machine.
NodeUris
Gets or sets the cluster node URIs for multi-node configuration.
public List<Uri>? NodeUris { get; set; }
Property Value
Remarks
When set with one or more URIs, overrides NodeUri and uses a connection pool. The pool type is determined by ConnectionPoolType.
RequestTimeoutSeconds
Gets or sets the request timeout in seconds.
public int RequestTimeoutSeconds { get; set; }
Property Value
- int
Defaults to 30 seconds.
SourceTypeInfoResolver
Gets or sets generated JSON metadata for projection documents. Required for native AOT.
public IJsonTypeInfoResolver? SourceTypeInfoResolver { get; set; }
Property Value
- IJsonTypeInfoResolver
The application source-generated resolver, or null for the default serializer.
Methods
Validate()
Validates the options and throws if invalid.
public void Validate()
Exceptions
- InvalidOperationException
Thrown when required options are missing.