We currently are importing data using Logstash. One of the fields ("request") is a JSON stored as a string. We now require a section of this stored JSON as fields in the searchable index. I have updated Logstash filter using
filter {
json {
source => "request"
target => "[@metadata][request_json]"
}
if [@metadata][request_json][merchant] {
# in the Request, pull out the Merchant-ID
mutate {
add_field => {
"merchant_id" => "%{[@metadata][request_json][merchant][id]}"
"merchant_name" => "%{[@metadata][request_json][merchant][name]}"
}
}
}
}
Which works great for new data.
How can I update the indices for the historic data? I'm using Elasticsearch, Logstash and Kibana 8.5.3
Thx for the advice. So, I'm looking at this, but struggling how to implement the "painless" script for this, since painless has limited support for JSON. I've started off OK with
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.