In theory, scripted fields could be used to define new fields post hoc. However, with the following caveats:
- Scripted fields are calculated at display time so there are performance implications. For example, something that will be prohibitively slow and not recommended is to retrieve the
_sourcefield via a scripted field and parsing it to get the not_analyzed version of a field (instead of defining this in Elasticsearch as part of a
not_analyzedmapped field for indexing).
- While scripted fields become part of the documents you view in Kibana, they are not part of the Elasticsearch index which means that they cannot be searched.