Elastic - Logstash: Copy data from one field to another field within same index - both the fields are nested

Hi, I am trying to copy data from one field to another field within the same index using filter -> mutate -> copy

I want to mention that both the fields are nested.

When I run the script it doesn't show me if it copied data to the new field or not?

Could someone please help me with it?

Below is my logstash script which I am currently working with.


input {
	elasticsearch {
		hosts =>
		user => 
		password => 
		index => 
		ssl =>
		#size => 1
		docinfo =>
		#docinfo_fields =>
		ca_file =>
		query => '{
				"_source": ["allbirds_metadata.resumeLink","allbirds_metadata.resumeLastUpdatedDate"],
	 			"query": {
							"bool": {
							"must": [{
			  				"exists": {
							"field": "allbirds_metadata.resumeLink"
										}			
								},
							{
							"exists": {
								"field": "allbirds_metadata.resumeLastUpdatedDate"
									}
							}
					]		
				}
			}
		}'
	}
}

filter {
     mutate {
	copy => {"allbirds_metadata.resumeLink"=> "allbirds_metadata.attachments.path" }
        copy => { "allbirds_metadata.resumeLastUpdatedDate" => "allbirds_metadata.attachments.upload_time" }
    }
}
output {
 stdout {codec => rubydebug { metadata => true } }
}

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