Hello,
With runtime fields, is it possible to extract a substring from a given field? For example,
"url" : "https://hello.com/random?username"
How would I create a runtime field to grab the "username" string ?
Hello,
With runtime fields, is it possible to extract a substring from a given field? For example,
"url" : "https://hello.com/random?username"
How would I create a runtime field to grab the "username" string ?
Hi @hi_xavier
For the time being some string manipulation will do it, but there's a proposal to add a URL parser to Painless which will make it safer:
emit(url.substring(url.indexOf('?') + 1));
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
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.