When we search for document in SharePoint it shows incorrect document version that is 8.1 when the document is sitting at 9.0 version, this document is check in and approved though it shows incorrect. when I click and try to open it then it is opening correct version of document(9.0). Can you please assist me with this. I really appreciate your help.
Search is just displaying the data as it got them when it indexed the content.
I assume that the text you're highlighting is a quick part showing the version number.
What happens is then the following.
- A user checks out and edits a draft version of the document (8.1)
- Word updates the quick part to show this version (8.1)
- At some point the document is approved (now version 9.0)
- But the text isn't really changed so when search indexes the document it sees the draft version in the text (8.1)
- When you open the document word gets the updated version (9.0) and updates the text, so you see the updated version (9.0), but search never sees this as part of the text, only as the document property.
Unfortunately there is no way to change the text crawled to be up to date if it's the SharePoint version number you use.
Here is a couple of other solution (just out of my head and not tested):
- Use another column in the quick part, could be calculated to be x.0 if approved and (x+1.0) when in draft
- Change display template to show Managed Property with version number