Skip to content

RFC: Use mapping parser implementers instead of extending interface to support different versions #142

@erhathaway

Description

@erhathaway

public static flattenMappings710(rawMappings: ESMapping710): Record<string, ESMappingType> {

In the above code, a new method was added to the mapping parser to support a specific Elasticsearch version. This pattern presents issues b/c it requires conditional logic to use the method (you have to know which version you want and which methods go with which version...). The usual solution would be to add a new mapping parser implementer (specific to a ES version) that conforms to the mapping parser interface.

@markrsocialnative @dearsaturn

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