cannot see files in document library in search results sharepoint

User cannot see files in document library and sharepoint 2019 search not returning results from specific document library.I came across this search error where user is trying to search documents selecting the option “search in same site” instead of “all sites” from search box and sharepoint search not returning results. User can find documents from other library with in same site but cannot see files in specific document library. The first point comes to mind for search error is content not crawled. Indexing not done for this situation and sharepoint search not working. As per my investigation I found the setting of the library as below.

Advertisements
cannot see files in document library sharepoint search

By default SharePoint only crawls major versions of files and draft items are only viewable by their creators. SharePoint is behaving as expected out of box.Draft items are not crawled in SharePoint for which user cannot see files in document library.

Advertisements

Resolve search result error for document library as below

  • Navigate to Document Library Settings -> Versioning Settings -> Draft Item Security.
  • Select option “Any user who can read items”.
  • This will allow all users to see draft items including the crawling account.
  • Else you need to select “Create major versions” option or can publish the documents as major versions if want to get those documents in search result as per client wish.
  • Reference link Click Here.

Applying above settings you will find document not showing in search sharepoint will start showing result.

Advertisements
Advertisements

SharePoint item crawled returned error when attempting to download the item example aspx file

Error:

SharePoint Crawl Log Error: The SharePoint item being crawled returned an error when attempting to download the item for example .aspx files

Solution:

1.Open Regedit on your search server/s
2.Navigate to this registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\14.0\Search\Global\Gathering Manager
3.Change Value “UserAgent” from “MSIE 4.01” to “MSIE 8.0
4.Restart the SharePoint Search Service.
5.Open a SharePoint PowerShell
6.Get-SPSessionStateService
7.If this returns false then we need to deploy one
Enable-SPSessionStateService -DatabaseName “NameOfDatabase”

Crawling error when attempting to download item

Crawling error when attempting to download item

There is error in crawling in the SharePoint environment and the error message is “The SharePoint item being crawled returned an error when attempting to download the item for example .aspx files”

Crawling Error:

SharePoint Crawl Log Error: The SharePoint item being crawled returned an error when attempting to download the item for example .aspx files

Solution:

  1. Open Regedit on your search server.
  2. Navigate to this registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\14.0\Search\Global\Gathering Manager
  3. Change Value “UserAgent” from “MSIE 4.01” to “MSIE 8.0”.
  4. Restart the SharePoint Search Service.
  5. Open a SharePoint PowerShell.
  6. Get-SPSessionStateService.
  7. If this returns false then we need to deploy one
    Enable-SPSessionStateService -DatabaseName “NameOfDatabase”
[siteorigin_widget class=”WordAds_Sidebar_Widget”][/siteorigin_widget]
[siteorigin_widget class=”WordAds_Sidebar_Widget”][/siteorigin_widget]