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

[Search Source] Request date fields explicitly #91478

Merged
merged 25 commits into from
Feb 17, 2021

Conversation

majagrubic
Copy link
Contributor

@majagrubic majagrubic commented Feb 16, 2021

Summary

As discussed with ES team, to overcome elastic/elasticsearch#67063, Kibana would request an explicit list of date fields, with the corresponding format. This will allow date_nanos fields to be returned with the appropriate precision.
This PR adds this functionality to search source.

Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
- [ ] Documentation was added for features that require explanation or tutorials

  • Unit or functional tests were updated or added to match the most common scenarios
    - [ ] Any UI touched in this PR is usable by keyboard only (learn more about keyboard accessibility)
    - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: FF, Chrome)
    - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
    - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this in your browser)
    - [ ] This was checked for cross-browser compatibility

For maintainers

@majagrubic majagrubic marked this pull request as ready for review February 16, 2021 15:00
@majagrubic majagrubic requested a review from a team as a code owner February 16, 2021 15:00
};
}
return fld;
body.fields = this.getFieldsWithoutSourceFilters(index, body.fields);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎨 body.fields is overwritten in the next line again. This should rather be a local variable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM

@majagrubic
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
data 911.2KB 912.1KB +945.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@majagrubic majagrubic merged commit 8f1b395 into elastic:master Feb 17, 2021
@majagrubic majagrubic deleted the date_fields_format branch February 17, 2021 16:02
majagrubic pushed a commit to majagrubic/kibana that referenced this pull request Feb 17, 2021
* [Search Source] Remove includes when retrieving fields from source

* Removing unusded imports

* Use exclusion filters to retrieve a list of fields

* Exclude _source from fields list

* Fix small check in getting the field list

* Fixing faulty import

* Filter logic

* Adding a unit test for maps use case

* Updating maps unit & functional test

* Add unit test

* Move logic for requesting a field list inside search_source

* Remove unnecessary mock

* Code cleanup as per PR comments

* First pass

* Revert functionality for search_after

* [Search Source] Add date fields with format

* Remove unnecessary log from test

* Use local variable

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
majagrubic pushed a commit that referenced this pull request Feb 17, 2021
* [Search Source] Remove includes when retrieving fields from source

* Removing unusded imports

* Use exclusion filters to retrieve a list of fields

* Exclude _source from fields list

* Fix small check in getting the field list

* Fixing faulty import

* Filter logic

* Adding a unit test for maps use case

* Updating maps unit & functional test

* Add unit test

* Move logic for requesting a field list inside search_source

* Remove unnecessary mock

* Code cleanup as per PR comments

* First pass

* Revert functionality for search_after

* [Search Source] Add date fields with format

* Remove unnecessary log from test

* Use local variable

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants