Hello @Dariia_Hrebenichenko
Welcome to the community.
This will return all the values of filename as per the records which qualify your rule
{
"filename": "{{#context.hits}} {{_source.filename}} {{/context.hits}}"
}
If you just want to display the first value :
{
"filename": "{{context.hits.0._source.filename}}"
}
Thanks!!