Filter Plugin: Elasticsearch

i found a solution to retrieve data from a previous event using Ruby Fitler.

   if[transaction_Id] {
        ruby {  
            init => "@@map = {}"
            code => "
                @@map[event['verif_id']] = event['transaction_Id']
                @@map[event['session_id']] = event['session_id']
            "
        }
   } else if[classname] == "SendingSMS" {
        ruby{
            code => "
                if event['session_id'] == @@map[event['session_id']] 
                then
                    event['transaction_Id'] = @@map[event['verif_id']] 
                end"
        }
   }

Sincerely,
Chris.