elasticsearch-net
elasticsearch-net copied to clipboard
CreateIndexDescriptor Mappings -> Map Api usage issue
NEST/Elasticsearch.Net version: 7.15.5
Elasticsearch version: 8.9.0
Description of the problem including expected versus actual behavior:
Steps to reproduce:
- use the CreateIndexDescriptor only to validate a mapping
new CreateIndexDescriptor(indexName).Mappings(md => md.Map<TDocument>(m => m.AutoMap(5)));
Or as the new API suggested:
new CreateIndexDescriptor(indexName).Map<TypeMappingDescriptor<TDocument>>(mp => mp.AutoMap(5));
expected is a IndexState object with a correct mapping.
- if i use these new API to create only (without settings) a Indexstate with a mapping, i got a empty mapping.
The same APi usage like
descriptor.InitializeUsing(indexState) .Settings(s => s.Setting(UpdatableIndexSettings.MaxNGramDiff, 3)) .Map<TypeMappingDescriptor<TDocument>>(mp => mp.AutoMap(5));
works correctly.
@flobernd Have you an idea please or is this a bug?