Skip to content

Unable to set index property on dynamic template for generic type #2066

Closed
@tagg7

Description

@tagg7

NEST/Elasticsearch.Net version: 2.3

Elasticsearch version: 2.3.1

Description of the problem including expected versus actual behavior: There is no way to set a dynamic template to not index all fields by default when setting the mapping.

In Elasticsearch.Net 1.x, it is possible to do the following:

    .DynamicTemplates(d => d
                    .Add(t => t
                        .Name("base")
                        .Match("*")
                        .MatchMappingType("*")
                        .Mapping(m2 => m2
                            .Generic(s => s
                                .Index("no")
                            )
                        )
                    )
                )

However, in Elasticsearch.Net 2.x there is no way to set this. There is no GenericMappingDescriptor available, and the index property is hidden for the "object" type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions