If I search a document in SharePoint Search, I am getting two files with different names, but the link/path to the documents are the same. Kindly help to solve this confusion.
If I search documents in Library, I get only two documents.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
I would start by switching to the OOB Display Template rather than the custom one to rule out an error with your custom Display Template.
This looks like a Document ID issue. Sometimes SharePoint issues a non-unique Doc ID. It helps if you state SharePoint Version as well.
This is a solution you can already find on this Forum: