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

[Index Patterns] Disallow nested field time field? #103082

Closed
Tracked by #166175
Dosant opened this issue Jun 23, 2021 · 5 comments
Closed
Tracked by #166175

[Index Patterns] Disallow nested field time field? #103082

Dosant opened this issue Jun 23, 2021 · 5 comments
Labels
Feature:Data Views Data Views code and UI - index patterns before 8.0 impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.

Comments

@Dosant
Copy link
Contributor

Dosant commented Jun 23, 2021

version: up to 7.13/master

Kibana has limited nested field support: #1084

Index pattern editor allows creating of an index pattern with nested field time field, but looks like this shouldn't be possible, because Discover fails with an error when it tries to build a data aggregation:

Uncaught Error: Saved field "nested.timeField" of index pattern "my-index-pattern" is invalid for use with the "Date Histogram" aggregation. Please select a new field.

Alternatively, maybe we should treat such index patterns as non-time-based?

cc @mattkime @kertal

@Dosant Dosant added Feature:Data Views Data Views code and UI - index patterns before 8.0 Team:AppServices labels Jun 23, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@mattkime
Copy link
Contributor

I suspect this problem could happen elsewhere as nested field query and aggregation support is a bit unique - https://www.elastic.co/guide/en/elasticsearch/reference/current/nested.html#nested-accessing-documents

IMO, this is part of a larger 'supporting nested fields' effort.

Hm, are these fields available in the index pattern timestamp field selection but filtered out of the index pattern field list?

@Dosant
Copy link
Contributor Author

Dosant commented Jun 24, 2021

Hm, are these fields available in the index pattern timestamp field selection but filtered out of the index pattern field list?

@mattkime, this is the particular Discover error I looked at: #103083

When Discover builds its date histogram chart it fails to build an aggregation.
Digging deeper, this is the condition that prevents such aggregation to be built:

(onlyAggregatable && (!field.aggregatable || isNestedField(field))) ||

And this when this check was added: #54820
I wonder if that change was more focused on visualize and that agg would actually work in discover

@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Jun 28, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:medium Medium Level of Effort and removed loe:small Small Level of Effort labels Jul 7, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:small Small Level of Effort and removed loe:medium Medium Level of Effort labels Apr 1, 2022
@petrklapka petrklapka added Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. and removed Team:AppServicesSv labels Nov 28, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@kertal
Copy link
Member

kertal commented Oct 23, 2023

Closing this because it's not planned to be resolved in the foreseeable future. It will be tracked in our Icebox and will be re-opened if our priorities change. Feel free to re-open if you think it should be melted sooner.

@kertal kertal closed this as completed Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Data Views Data Views code and UI - index patterns before 8.0 impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Projects
None yet
Development

No branches or pull requests

5 participants