SharePoint 2013: The item has been truncated in the index because it exceeds the maximum size
Problem
During routine system checks, you discover numerous instances of the following warning occurring in the Search subsystem crawl log:
The item has been truncated in the index because it exceeds the maximum size. ( Item truncated. Field=body, Occurrences=121961, Chars=524290; ; SearchID = [ID string] )
Troubleshooting
Checked MaxCharactersInPropertyStoreForRetrieval property: executed this commandlet
(Get-SPEnterpriseSearchMetadataManagedProperty -Identity body -SearchApplication (Get-SPEnterpriseSearchServiceApplication)).MaxCharactersInPropertyStoreForRetrieval
This returned 2097152, which is greater than the Chars count in the warning. This value is in bytes.
Checked MaxCharactersInPropertyStoreIndex property: executed this commandlet:
(Get-SPEnterpriseSearchMetadataManagedProperty -Identity body -SearchApplication (Get-SPEnterpriseSearchServiceApplication)).MaxCharactersInPropertyStoreIndex
This returned 0. This value is in bytes.
Increased MaxCharactersInPropertyStoreIndex property: executed this script
$prop=Get-SPEnterpriseSearchMetadataManagedProperty -Identity body -SearchApplication (Get-SPEnterpriseSearchServiceApplication)
$prop.MaxCharactersInPropertyStoreIndex=2097152
$prop.Update()Checked Crawl Log for number of warnings: found 1405.
Set three instances of this warning to be recrawled and then launched incremental crawl: see Notes below for steps.
Checked Crawl Log for number of warnings: found 1402.
Set all instances of warning to be re-crawled and then launched incremental crawl.
Checked Crawl Log for number of warnings: found only 1271. This indicates that 134 instances of this warning were resolved by increasing the MaxCharactersInPropertyStoreIndex value.
Solution
- Increase the value of MaxCharactersInPropertyStoreIndex to something greater than the Occurrences value in the warning message.
References
- TechNet
- Get-SPEnterpriseSearchMetadataManagedProperty
- Get-SPEnterpriseSearchServiceApplication
- Software boundaries and limits for SharePoint 2013: scroll down to the Search: item size limits section; then look in the table, fourth and fifth rows for specific discussions on the properties engaged above.
- Attachment size crawl issue
- DocParser error in SharePoint 2013 Search
- MSDN
- Waldek Mastykarz:
- SharePoint StackExchange:
- Network Steve
- ShiPoint
- SharePoint Republic
Notes
- To re-crawl an item appearing in the crawl log, perform these steps:
- Go to the Search Administration page
- Click Crawl Log (left quicklinks area)
- In the Warnings column, click on the number that appears there
- Hover the cursor over one of the instances of the warning: a dropdown bar appears
- Click it and then select Recrawl this item in the next crawl.
- Chars: this value, in the warning message, indicates how much data is returned from the query.
- The MaxCharactersInPropertyStoreForRetrieval managed property relates to this,
- Occurrences: this value indicates how much data may actually be stored in the index.
- The MaxCharactersInPropertyStoreIndex managed property relates to this.
- After setting all remaining instances to be re-crawled, I found that six remained and that re-crawling these six was not affected by the change in the MaxCharactersInPropertyStoreIndex value. Still not clear why that is.