Add tests around accessing field aliases in scripts.#31417
Add tests around accessing field aliases in scripts.#31417jtibshirani merged 3 commits intoelastic:field-aliasesfrom
Conversation
|
Can these be unit tests on LeafFieldLookup instead of integration tests? |
|
Pinging @elastic/es-search-aggs |
|
That makes sense -- I took a stab at converting them to unit tests. In addition to |
b71de74 to
b62c73a
Compare
jpountz
left a comment
There was a problem hiding this comment.
Do we need to test expressions explicitly? If everything goes through LeafDocLookup, it shouldn't buy more than LeafDocLookupTests?
Not to be done in that PR, but I wonder that we might want to remove IndexFieldData.getName, which is one way that the info that an alias is queried rather than a concrete field is leaked, yet it doesn't seem much used.
|
I added the dedicated test for And thanks for the pointer -- I'll take a closer look at |
jpountz
left a comment
There was a problem hiding this comment.
Thanks for the explanation. LGTM
* Make sure aliases can be referenced through params._fields. * Make sure aliases can be accessed through 'doc'. * Convert ExpressionTests to a unit test.
|
Following up on |
* Make sure aliases can be referenced through params._fields. * Make sure aliases can be accessed through 'doc'. * Convert ExpressionTests to a unit test.
* Make sure aliases can be referenced through params._fields. * Make sure aliases can be accessed through 'doc'. * Convert ExpressionTests to a unit test.
* Make sure aliases can be referenced through params._fields. * Make sure aliases can be accessed through 'doc'. * Convert ExpressionTests to a unit test.
* Make sure aliases can be referenced through params._fields. * Make sure aliases can be accessed through 'doc'. * Convert ExpressionTests to a unit test.
* 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)
* Make sure aliases can be referenced through params._fields. * Make sure aliases can be accessed through 'doc'. * Convert ExpressionTests to a unit test.
* 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.