Skip to content

[Search Source] Request date fields explicitly#91478

Merged
majagrubic merged 25 commits intoelastic:masterfrom
majagrubic:date_fields_format
Feb 17, 2021
Merged

[Search Source] Request date fields explicitly#91478
majagrubic merged 25 commits intoelastic:masterfrom
majagrubic:date_fields_format

Conversation

@majagrubic
Copy link
Copy Markdown
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
@majagrubic majagrubic requested a review from ppisljar February 16, 2021 15:00
};
}
return fld;
body.fields = this.getFieldsWithoutSourceFilters(index, body.fields);
Copy link
Copy Markdown
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Copy Markdown
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