Find the shot field in nested field with python

I want to find the match field in a nested field.

the nested field is comprise of two fields as follows:
"text":{
"song":text
"lyrics":text
}

when i use nested query, the score_mode is set to type max. So i want to get the max score from field song or lyrics. And I want to get which field the max score come from.

How can I realize it with python library such as elasticsearch_dsl. inner_hits or others? please give an example for me.

thanks ahead

anybody can help?

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