SharePoint is used by different organisations because of its capability to search. Many SharePoint based applications uses SharePoint Search to represent the huge data which can not be fetched using CAML. So it is important for a SharePoint Admin guy to examine the crawl logs on regular basis weather it is a error or warning. Obviously error are on high priority, but We should not avoid warnings as well.

Sometime we notice very generic message for different type of search issues but actual cause can be different. One of the warning message we notice in crawl logs is "The item has been truncated in the index because it exceeds the maximum size.". If you see this warning carefully, it shows the actual cause of the issue.

By default SharePoint Search crawler crawl the content up to first 16384 characters. In case any document having more than 16384 characters, it gives following warnings in crawl log. 

The item has been truncated in the index because it exceeds the maximum size. ( Item truncated. Field=PublishingPageContentOWSHTML, Occurrences=27931, Chars=16384; )

In above warning message, if you see the "Field=PublishingPageContentOWSHTML" than it means you are leveraging the Web Content Management (WCM) capabilities of SharePoint 2013 and wants to crawl the content to represent to the end users based on search. But the content of the publishing page contains more than 16384 characters. However crawler will crawl the content upto 16384 characters and will show in search reaults but leave the content after this limit.

In overcome this situation you have to increase the number of characters that the particular Managed Property can store for indexing a particular item field. For some of the other fields the warning should be like -

The item has been truncated in the index because it exceeds the maximum size. ( Item truncated. Field=docacl, Occurrences=27931, Chars=16384; )

OR

The item has been truncated in the index because it exceeds the maximum size. ( Item truncated. Field=body, Occurrences=27931, Chars=16384; )

So, for each property mentioned in warning messages as truncated in the Crawl Log, run the following PowerShell commands:

$ssa = Get-SPEnterpriseSearchServiceApplication

// if Field=PublishingPageContentOWSHTML
$mp = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $ssa -Identity
"PublishingPageContentOWSHTML"

// if Field=docacl
$mp = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $ssa -Identity
"docacl"

// if Field=body
$mp = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $ssa -Identity
"body"

$mp.MaxCharactersInPropertyStoreIndex = 2097152
$mp.Update()

After running the above commend set, execute a Full Crawl on your Content Source. This warning will be removed from your Crawl Log.

Copyrights 2017, www.expertsupdates.com