Class DefaultIndexMappingConvention
- Namespace
- Excalibur.Data.ElasticSearch.Projections
- Assembly
- Excalibur.Data.ElasticSearch.dll
Default implementation of IIndexMappingConvention that returns the framework's inferred mappings unchanged.
public sealed class DefaultIndexMappingConvention : IIndexMappingConvention
- Inheritance
-
DefaultIndexMappingConvention
- Implements
- Inherited Members
Remarks
This convention applies the standard CLR-to-Elasticsearch type mapping:
string,Guid, enums →keywordint,long, etc. →longfloat,double,decimal→doubleDateTime,DateTimeOffset→datebool→boolean
This is the convention used when no custom convention is specified in IndexMappingConvention.
Properties
Instance
Gets the singleton instance of the default convention.
public static DefaultIndexMappingConvention Instance { get; }
Property Value
Methods
ConfigureMappings(Type, Properties)
Configures the Elasticsearch index mappings for the specified projection type.
public Properties ConfigureMappings(Type projectionType, Properties inferredProperties)
Parameters
projectionTypeTypeThe .NET projection type being mapped.
inferredPropertiesPropertiesThe inferred property mappings from the framework's reflection-based mapping. Implementations may modify, augment, or replace these entirely.
Returns
- Properties
The final Elastic.Clients.Elasticsearch.Mapping.Properties to use for index creation. Return
inferredPropertiesunchanged to accept defaults.