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

Facilitate adding new fields to existing indices #48063

Closed
jpountz opened this issue Oct 15, 2019 · 4 comments
Closed

Facilitate adding new fields to existing indices #48063

jpountz opened this issue Oct 15, 2019 · 4 comments
Labels
>feature :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch

Comments

@jpountz
Copy link
Contributor

jpountz commented Oct 15, 2019

One use-case we would like to better support at the stack level is the ability to introduce new fields in time-based indices. The way it is done today consists of adding fields to the index template and maybe an ingest processor so that future indices would pick it up. One issue with this approach is that the field only becomes really available after some time, when all indices in common time ranges have this new field indexed. These couple hours/days during which the field is not yet available on enough historical data are sometimes problematic.

Could we support adding field views to existing indices to better support this use-case, e.g. by supporting scripted fields? Performance would obviously be bad for some time, but this is sometimes a better trade-off than having to wait for a long time before being effectively able to use the new field in Kibana.

Probably depends on #48058

@jpountz jpountz added >feature :Search Foundations/Mapping Index mappings, including merging and defining field types labels Oct 15, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Mapping)

@colings86
Copy link
Contributor

The mapping of this field will probably need to contain the type of result expected by the script so we can apply it correctly. For example this could be used to determine which aggregations are applicable to the field and could be returned by field caps API as the field type so client applications can treat the field as if it were an indexed field of the relevant type

@jpountz
Copy link
Contributor Author

jpountz commented Feb 28, 2020

@colings86 Agreed. I think it's also important so that these fields can work in the case that some indices have fields mapped as double (for instance) and other indices have the field mapped as a script. One option is to have an option in the mapping like you suggested, another one would be to have one field type for each return type.

@colings86 colings86 changed the title Scripted fields Runtime fields Mar 3, 2020
@rjernst rjernst added the Team:Search Meta label for search team label May 4, 2020
@javanna javanna changed the title Runtime fields Facilitate adding new fields to existing indices Jul 9, 2020
@javanna
Copy link
Member

javanna commented Jun 16, 2022

Now that we have support for runtime fields as well as data streams, I would lean towards closing this issue in favor of ##72142 . Feel free to reopen if you think otherwise.

@javanna javanna closed this as completed Jun 16, 2022
@javanna javanna added Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch and removed Team:Search Meta label for search team labels Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>feature :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch
Projects
None yet
Development

No branches or pull requests

5 participants