Skip to content

CreateIndexDescriptor Mappings -> Map Api usage issue #7929

Closed
@sbodese

Description

@sbodese

NEST/Elasticsearch.Net version: 7.15.5

Elasticsearch version: 8.9.0

Description of the problem including expected versus actual behavior:

Steps to reproduce:

  1. 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.

  1. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions