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

Add support for field aliases. #32172

Merged
merged 9 commits into from
Jul 18, 2018
Merged

Add support for field aliases. #32172

merged 9 commits into from
Jul 18, 2018

Commits on Jul 18, 2018

  1. Add basic support for field aliases in index mappings. (#31287)

    * Add basic support for field aliases through a new top-level mapper type.
    * Add tests for queries, aggregations, sorting, and fetching doc values.
    * Make sure we properly handle wildcard fields in query string queries.
    * Allow for aliases when requesting suggestions.
    * Allow for aliases when requesting highlights.
    * Add a test for field capabilities.
    jtibshirani committed Jul 18, 2018
    Configuration menu
    Copy the full SHA
    e2ebaed View commit details
    Browse the repository at this point in the history
  2. Allow for aliases when fetching stored fields. (#31411)

    * When loading stored fields, resolve wildcard patterns against the mappings instead of the index.
    * Minor simplifications to the logic in FetchPhase.
    * Pull out a shared method FetchPhase#getSearchFields.
    * Allow for aliases when fetching stored fields.
    jtibshirani committed Jul 18, 2018
    Configuration menu
    Copy the full SHA
    f3de6f3 View commit details
    Browse the repository at this point in the history
  3. Add tests around accessing field aliases in scripts. (#31417)

    * Make sure aliases can be referenced through params._fields.
    * Make sure aliases can be accessed through 'doc'.
    * Convert ExpressionTests to a unit test.
    jtibshirani committed Jul 18, 2018
    Configuration menu
    Copy the full SHA
    dddb76b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    79fd45f View commit details
    Browse the repository at this point in the history
  5. Add validation for field alias mappings. (#31518)

    * Perform basic validation on the target of an alias.
    * Validate that an alias and its target have the same nested scope.
    * Pull out some validation logic into a separate class.
    * Validate the uniqueness of field alias mappings.
    jtibshirani committed Jul 18, 2018
    Configuration menu
    Copy the full SHA
    65ffdec View commit details
    Browse the repository at this point in the history
  6. Return both concrete fields and aliases in DocumentFieldMappers#getMa…

    …pper. (#31671)
    
    * Rename DocumentFieldMappers#getMapper to getFieldMapper.
    * Introduce a new DocumentFieldMappers#getMapper that returns a Mapper.
    * Fix an issue around field aliases in geo suggestion contexts.
    * Make sure a field alias can refer to a percolate query.
    * Remove easy-to-fix uses of DocumentFieldMappers#getFieldMapper.
    * Include alias mappers in DocumentFieldMappers#getMappers.
    * Make sure we detect conflicts between dynamic object mappers and field aliases.
    * Throw an exception if aliases are specified as the target of copy_to.
    jtibshirani committed Jul 18, 2018
    Configuration menu
    Copy the full SHA
    ec65a79 View commit details
    Browse the repository at this point in the history
  7. Make sure that field-level security is enforced when using field alia…

    …ses. (#31807)
    
    * Add basic unit tests for field level security with field aliases.
    * Ensure that field caps information is filtered when a field alias is provided.
    jtibshirani committed Jul 18, 2018
    Configuration menu
    Copy the full SHA
    5995794 View commit details
    Browse the repository at this point in the history
  8. Add more comprehensive tests for field aliases in queries + aggregati…

    …ons. (#31565)
    
    * Make sure that significant terms aggregations work with field aliases.
    * Add a test for ValuesSourceConfig.
    * Allow for subclasses of AggregatorTestCase to provide field aliases.
    * Add tests for nested and reverse_nested aggregations.
    * Add an integration test for nested queries.
    * Add an integration test for 'more like this' queries.
    * Add tests for querying and loading meta-fields.
    * Add unit tests for the relevant query builders.
    * Add integration tests for geo polygon and shape queries.
    * Fix static analysis violations.
    * Document that aliases cannot be used in a query lookup path.
    jtibshirani committed Jul 18, 2018
    Configuration menu
    Copy the full SHA
    6cfa032 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    c3ff6ce View commit details
    Browse the repository at this point in the history