Tuesday, April 19, 2016

Sitecore warning Could not compute value for ComputedIndexField

In one implementation where PDF content was being indexed in Sitecore (with Luncene), the content was not returning in the search results (no PDFs appearing). After looking in the crawling logs, the following warning was in there for each PDF document that was attempting to be indexed:
WARN  Could not compute value for ComputedIndexField: _content for indexable: sitecore://web/{10D8A7A1-880C-4143-923C-84D94BA56232}?lang=en&ver=1
Exception: System.Runtime.InteropServices.COMException
I am using PDFBox to index PDF content however there was an element left  in the default Lucene configuration file (/App_Config/Include/Sitecore.ContentSearch.Lucene.DefaultIndexConfiguration.config):
<field fieldName="_content" storageType="no"  indexType="tokenized">Sitecore.ContentSearch.ComputedFields.MediaItemContentExtractor,Sitecore.ContentSearch</field>
Should be changed to the computed index field in your solution which does the PDF indexing.
<field fieldName="_content"                  type="MyProject.ComputedIndexField.IndexPdfContent,MyProject"></field>

No comments:

Post a Comment