How to get elasticsearch document id against topdocs.scandocs[i].doc

In my elasticsearch plugin code I get the results in topdocs. While looping through topdocs, there is an id that is retrieved by doing topdocs.scandocs[i].doc. This id is not the elasticsearch document id. How can I get the elasticsearch document id so that I can compare if what is returned in topdocs is really the result that is return by the elasticsearch query?

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