Not able to retrieve nested document in native java expert_scripts for nested function_score query

Hey! I am using 7.8.1 version of elasticsearch and using script-engine to score the document. When i use function_score query, i am able to read the documet in ScriptEngine. Once I do nested function_score query then i am not able to get the nested match(document) in my ScriptEngine.

Please help!