0

I realize that variations of this question have been asked before, but none of the answers have proved helpful.

I have a document library with Major and Minor versions and draft item security enabled (only users with edit capability see drafts). The problem I have run into is that people want to see draft versions in search results. I realize that the whole point of drafts is to restrict them from being accessible to everyone, but is there a way to make draft items show in the search results?

More importantly, is it possible to make draft items show in the search results, but ONLY for people with edit capability who can see the drafts already? My goal is to make it easier for reviewers to find the drafts they need to review (they refuse to use the metadata in columns to filter their results).

  • I do not have a farm to test right now. But I believe making your crawl account have higher permission (high enough that allow crawler read draft version) can make draft version show in search result. A user with read only access can also see these "draft" result but when they click on the link they can only open the published version. If they click on a v0.1 document they will get 404 error. Sorry I do not have a farm for test. Correct me if I am wrong. – Mark L Feb 3 '17 at 1:56
2

Draft items are not crawled in SharePoint > Well this is expected behaviour. It only crawls the major versions of the file.

So you have 3 options:

1) Change draft item security

Document Library Settings -> Versioning Settings -> Draft Item Security

Select the option Any user who can read items.

This will allow all users to see draft items including the crawling account.

After that , reset the index and do a full crawl.

2) Add the content access account to the approvers group

After adding to approver group , reset the index and do a full crawl.

This will allow draft items to be visible in the search results. So when a user who has lower permissions clicks on it, they will get access denied.

3) Create a custom page with custom webpart which overrides the CoreResults webpart and fetches results. It will use the SPSecurity.RunWithElevatedPrivileges method to get data from search and display it in a page.

Getting Elevated Search Results in SharePoint

Draft items are not crawled in SharePoint

  • Setting draft item security did the trick for me, also allowing me to display draft items in the 'Highlighted Content' web part in Modern SharePoint Online pages. – DRVR Jul 2 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.