Extract document id into another variable in logstash

My issue is the same as in Logstash elasticsearch filter error TypeError: can't convert nil into String