This is only one runtime field from our repository. Also visit the complete Elastic runtime field repository to get the full overview of whats possible.


Combining two field values can be done as easy as comparing two field values. The only difference is that you have both values together in one field. You may want to store Surname and Lastname in your index. Storing the complete name in a separate field would require extra storage. Using runtime fields to simply calculate the concatenation is a good way to save storage and achieve the same result.

Another use case for combining the values of two fields into one field is to build the query string for an external application. Lets say you would like to use multiple values of your document to e.g. jump into a virustotal analysis of your data. For doing that Kibana offers the ability to format fields that contain strings as URL. Doing that the user of Kibana is able to click on the field value.

This examples shows the combination of lat and lon values into a single field:

emit (doc['geo.dest.keyword'].value + ':' + doc['geo.src.keyword'].value);

Another important use case for concatenate two fields is to add multiple field values to the GET parameters of your target URL. Its also fine to only use a value from field. In that case the runtime field helps because you have a dedicated field for the link to the 3rd party system.

Complete sidebar inputs for 3rd party URL
def hostname = doc['host.name'].value;
def ip = doc['client.ip'].value;

emit(hostname + "/" + ip);
content share admin

About the author: Creator of the Elastic Content Share.

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *