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

ext: simplify mapping/template discovery #146

Open
slint opened this issue Jun 29, 2018 · 0 comments
Open

ext: simplify mapping/template discovery #146

slint opened this issue Jun 29, 2018 · 0 comments

Comments

@slint
Copy link
Member

slint commented Jun 29, 2018

The recursive functions that walk/parse templates/mappings are a usual source of confusion and are hard to tweak when changes or new features are introduced (e.g. supporting multiple ES versions, index/alias prefixing, etc).

In the end how most people would think about this problem would be something like:

  1. Build a tree with all mappings/templates (apply ES versioning logic here)
  2. Create the mappings/templates from the tree leaves (apply prefixing here)
  3. Create aliases based on tree roots and their leaves (apply prefixing here)

Of course any refactoring should include tests to prevent breaking existing behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant