Skip to content

Expose TypeName in IGetMappingResponse #2072

@russcam

Description

@russcam

The current implementation of IGetMappingResponse returns a dictionary of index string name and list of TypeMapping for the index, but does not expose the TypeName to which the TypeMapping relates to; so if the request asks for multiple types within a given index, there is no way of correlating the TypeMapping back to the type name.

We should expose the TypeName along with the TypeMapping. Changing the Mappings property in 2.x would be a breaking change so we should include another property for this. Maybe

public interface IGetMappingResponse : IResponse
{
    // .... other properties

    Dictionary<IndexName, IDictionary<TypeName, TypeMapping>> IndexTypeMappings { get; }
}

This came up on stackoverflow

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