Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
erhathaway opened this issue May 6, 2021 · 0 comments

Comments

@erhathaway
Copy link
Contributor

erhathaway commented May 6, 2021

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

@erhathaway erhathaway changed the title RFC: Implement mapping parsers specific to ES versions RFC: Use mapping parser implementers instead of extending interface to support different versions May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant