Add documentation around field aliases.#31538
Add documentation around field aliases.#31538jtibshirani merged 2 commits intoelastic:field-aliasesfrom
Conversation
|
Pinging @elastic/es-search-aggs |
34ea8bb to
da55544
Compare
|
|
||
| An `alias` mapping defines an alternate name for a field in the index. | ||
| The alias can be used in place of the target field in <<search, search>> requests, | ||
| and select other APIs like <<search-field-caps, field capabilities>>. |
jpountz
left a comment
There was a problem hiding this comment.
LGTM, I only left minor comments.
| documents. Instead, you should create a new index with the correct mappings | ||
| and <<docs-reindex,reindex>> your data into that index. If you only wish | ||
| to rename a field and not change its mappings, it may make sense to introduce | ||
| an <<alias, `alias`>> field. |
There was a problem hiding this comment.
I've noticed that we usually don't put spaces after the comma, not sure whether it has rendering implications.
There was a problem hiding this comment.
I'll check -- thanks.
There was a problem hiding this comment.
Update: I couldn't observe any rendering difference. I'll plan to keep it as-is, I think the space makes this read more clearly.
| <1> The path to the target field. Note that this must be the full path, including any parent | ||
| objects (e.g. `object1.object2.field`). | ||
|
|
||
| All relevant components of the search request accept field aliases. In particular, aliases can be |
There was a problem hiding this comment.
Feels weird to say "all" when source filtering is an exception?
There was a problem hiding this comment.
Will fix, I could see this being misleading.
| "_source": "route_length_miles" | ||
| } | ||
| -------------------------------- | ||
| // CONSOLE |
There was a problem hiding this comment.
let's add TEST[continued]?
| "docvalue_fields": ["route_*", "transit_mode"] | ||
| } | ||
| -------------------------------- | ||
| // CONSOLE |
There was a problem hiding this comment.
let's add TEST[continued]?
b039e37 to
c40fd9b
Compare
c40fd9b to
f8f613d
Compare
* 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)
* 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.
No description provided.