Hi, I have a field called url in elasticsearch document.
The sample value for the field is /3dpassport/login
I want to extract only the first string before / that is 3dpassport and store it in a field.
I am okay with doing this using logstash mutate as well. i tried it, but it is not working
with the above config both url and service_name have the value /3dpassport/login
I want to retain the original value of url and save 3dpassport in service_name.
If i change the config as follows
copy => {
"url" => "service_name"
}
split => {
"url" => "/"
}
``
then both url and service_name are having the split values. How can i achieve this?
Hi, I think you want to try the "mutate" filter to split the URL field and store part of the splitted result into a new field. Here's an example that might help:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.