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

Refactor MetaData to split off the concrete index name logic to a dedicated service #12058

Merged
merged 1 commit into from Jul 10, 2015

Commits on Jul 10, 2015

  1. Internal: refactored MetaData to split the concrete index name resolu…

    …tion to IndexNameExpressionResolver.
    
    Changes in a nutshell:
    * All expression logic is now encapsulated by ExpressionResolver interface.
    * MetaData#convertFromWildcards() gets replaced by WildcardExpressionResolver.
    * All of the indices expansion methods are being moved from MetaData class to the new IndexNameExpressionResolver class.
    * All single index expansion optimisations are removed.
    
    The logic for resolving a concrete index name from an expression has been moved from MetaData to IndexExpressionResolver. The logic has been cleaned up and simplified were was possible without breaking bwc.
    
    Also the notion of aliasOrIndex has been changed to index expression.
    
    The IndexNameExpressionResolver translates index name expressions into concrete indices. The list of index name expressions are first delegated to the known ExpressionResolverS. An ExpressionResolver is responsible for translating if possible an expression into another expression (possibly but not required this can be concrete indices or aliases) otherwise the expressions are left untouched. Concretely this means converting wildcard expressions into concrete indices or aliases, but in the future other implementations could convert expressions based on different rules.
    
    To prevent many overloading of methods, DocumentRequest extends now from IndicesRequest. All implementation of DocumentRequest already did implement IndicesRequest indirectly.
    martijnvg committed Jul 10, 2015
    Configuration menu
    Copy the full SHA
    52859e3 View commit details
    Browse the repository at this point in the history