Visualization of parts of URL

I am using ECK. I have created request PATHs visualization in Kibana. One of the URL has the format of /products/product-brand/<brand>. How can I create a visualization on parts of the URL like <brand>?

Hi @Kok_How_Teh,

There is an option to create a runtime field which would parse <brand> from URL values. And then use that new field in your visualizations.

A script for such field could look like the following:

def url = doc["url.keyword"].value;
if (url != null) {
    int index = url.lastIndexOf('/');
    if (index > -1) {
        emit(url.substring(index + 1));
1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.