Add basic support for field aliases in index mappings.#31287
Merged
jtibshirani merged 7 commits intoelastic:field-aliasesfrom Jun 18, 2018
Merged
Add basic support for field aliases in index mappings.#31287jtibshirani merged 7 commits intoelastic:field-aliasesfrom
jtibshirani merged 7 commits intoelastic:field-aliasesfrom
Conversation
afd01b8 to
f7b5b3d
Compare
Collaborator
|
Pinging @elastic/es-search-aggs |
5279839 to
b08f5a4
Compare
4ca2f04 to
c3cb62b
Compare
c3cb62b to
8fbfb6d
Compare
9 tasks
9aed225 to
115f1c5
Compare
jpountz
approved these changes
Jun 18, 2018
Contributor
jpountz
left a comment
There was a problem hiding this comment.
👍 I like the way it is done.
Contributor
There was a problem hiding this comment.
should we add the class of the field to make debugging easier?
Contributor
There was a problem hiding this comment.
let's make final and add some javadocs?
Contributor
There was a problem hiding this comment.
let's add the field name in the error message
Contributor
There was a problem hiding this comment.
things would be a bit easier to read for me this way:
String resolvedField = aliasToConcreteName.getOrDefault(field, field);
return fullNameToFieldType.get(resolvedField);
Contributor
Author
There was a problem hiding this comment.
Makes sense, will change.
Contributor
There was a problem hiding this comment.
maybe we should add an else block that throws an exception like you added in other places?
67c17ad to
71a7820
Compare
71a7820 to
0f9c196
Compare
Contributor
Author
|
@elasticmachine run sample packaging tests |
jtibshirani
added a commit
that referenced
this pull request
Jun 21, 2018
* 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
added a commit
that referenced
this pull request
Jun 21, 2018
* 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
added a commit
that referenced
this pull request
Jun 26, 2018
* 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
added a commit
that referenced
this pull request
Jul 4, 2018
* 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
added a commit
to jtibshirani/elasticsearch
that referenced
this pull request
Jul 16, 2018
* 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
added a commit
that referenced
this pull request
Jul 17, 2018
* 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
added a commit
that referenced
this pull request
Jul 18, 2018
* 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
added a commit
that referenced
this pull request
Jul 18, 2018
* Add basic support for field aliases in index mappings. (#31287) * Allow for aliases when fetching stored fields. (#31411) * Add tests around accessing field aliases in scripts. (#31417) * Add documentation around field aliases. (#31538) * Add validation for field alias mappings. (#31518) * Return both concrete fields and aliases in DocumentFieldMappers#getMapper. (#31671) * Make sure that field-level security is enforced when using field aliases. (#31807) * Add more comprehensive tests for field aliases in queries + aggregations. (#31565) * Remove the deprecated method DocumentFieldMappers#getFieldMapper. (#32148)
jtibshirani
added a commit
to jtibshirani/elasticsearch
that referenced
this pull request
Jul 24, 2018
jtibshirani
added a commit
that referenced
this pull request
Jul 24, 2018
* Add basic support for field aliases in index mappings. (#31287) * Allow for aliases when fetching stored fields. (#31411) * Add tests around accessing field aliases in scripts. (#31417) * Return both concrete fields and aliases in DocumentFieldMappers#getMapper. (#31671) * Add documentation around field aliases. (#31538) * Add validation for field alias mappings. (#31518) * Make sure that field-level security is enforced when using field aliases. (#31807) * Add more comprehensive tests for field aliases in queries + aggregations. (#31565) * Remove the deprecated method DocumentFieldMappers#getFieldMapper. (#32148) * Ensure that field aliases cannot be used in multi-fields. (#32219) * Make sure that field aliases count towards the total fields limit. (#32222) * Fix a test bug around nested aggregations and field aliases. (#32287) * Make sure the _uid field is correctly loaded in scripts. * Fix the failing test case FieldLevelSecurityTests#testParentChild_parentField. * Enforce that field aliases can only be specified on indexes with a single type.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Functionality covered in this PR:
docvalue_fields, suggestions, and highlights.This PR has become quite large -- I tried to keep each commit in the PR well-scoped, but let me know if it would help to split this into smaller PRs.