Skip to content

calling IndexAsync without specifying an index, does not use the default index for the type #8518

Closed
@jonyadamit

Description

@jonyadamit

Elastic.Clients.Elasticsearch version: 9.0.1

Elasticsearch version: 9.0.1

.NET runtime version: 9.0.4

Operating system version: Windows Server 2019 Standard 1809

Description of the problem including expected versus actual behavior:
Type inference for IndexAsync now calls ToString() on the type instead of using the value defined via DefaultMappingFor.

ElasticSearch returns an error:

Invalid index name [My.Own.Namespace.TypeName], must be lowercase

Steps to reproduce:

  1. Create a class MyClass
  2. While setting the connection up, specify that class: connection.DefaultMappingFor(typeof(MyClass), s => s.IndexName("myindexname")
  3. Call IndexAsync

Expected behavior
A document should be indexed.

Provide ConnectionSettings (if relevant):

Provide DebugInformation (if relevant):

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