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

Validate runtime fields sans scripts #85205

Closed
lockewritesdocs opened this issue Dec 7, 2020 · 2 comments
Closed

Validate runtime fields sans scripts #85205

lockewritesdocs opened this issue Dec 7, 2020 · 2 comments
Assignees
Labels
enhancement New value added to drive a business result Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@lockewritesdocs
Copy link

Background:
#84184 introduced runtime fields in the index template. Users can define a runtime field with or without a script. #85204 adds text to explain the behavior of a runtime field without a script:

Runtime fields without a script retrieve values from a field with the same name in _source. If a field with the same name doesn’t exist, no values are returned when a search request includes the runtime field.

Describe the feature:
If a user defines a runtime field and no field with the same name exists in _source, we should display an informational message to inform them. Something like:

No field with this name exists in _source. Search requests including this runtime field will not return any values.

Describe a specific use case for the feature:
A user defines a runtime field in the index template without a script. They later run a query that includes this runtime field, but no values are returned. They are curious why no values were returned.

@cjcenizal cjcenizal added enhancement New value added to drive a business result Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Dec 7, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@lockewritesdocs
Copy link
Author

I talked to @javanna about this validation and think that we should not do it. Kibana would need to validate both the mapping and _source fields to check whether a field with the same name as the runtime field exists. We can check whether the field exists in the mappings, but because not all _source fields are mapped, we can’t go and check every single document if there is one value for the field. We could, but it would probably be expensive and really slow Kibana’s response time.

Closing this issue and relying on the text introduced in #85204 to guide users on creating runtime fields without scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

No branches or pull requests

4 participants