Class IndexConfiguration
- Namespace
- Excalibur.Data.ElasticSearch.IndexManagement
- Assembly
- Excalibur.Data.ElasticSearch.dll
Represents the configuration for creating a new index.
public sealed class IndexConfiguration
- Inheritance
-
IndexConfiguration
- Inherited Members
Remarks
The SettingsJson, MappingsJson, and AliasesJson properties accept opaque JSON payloads so that consumers are not coupled to a specific Elasticsearch SDK version. Consumers who need typed configuration can serialize SDK types to JsonElement before assigning them:
var settings = new IndexSettings { NumberOfShards = 1 };
var mappings = new TypeMapping { Properties = new Properties { ... } };
var config = new IndexConfiguration
{
SettingsJson = JsonSerializer.SerializeToElement(settings),
MappingsJson = JsonSerializer.SerializeToElement(mappings),
};
Properties
AliasesJson
Gets the index aliases as opaque JSON.
public JsonElement? AliasesJson { get; init; }
Property Value
- JsonElement?
A JSON element representing alias configurations, or null if not specified.
MappingsJson
Gets the field mappings for documents in the index as opaque JSON.
public JsonElement? MappingsJson { get; init; }
Property Value
- JsonElement?
The type mapping configuration as a JSON element, or null if not specified.
SettingsJson
Gets the index settings as opaque JSON.
public JsonElement? SettingsJson { get; init; }
Property Value
- JsonElement?
The settings configuration as a JSON element, or null if not specified.