0

I'm attempting to index the content of pdf's with Solr 6.6.2 and Sitecore 8.2 Update 6.

I've got my solr indexes working correctly, and I'm able to search text from pages (content items) and I'm able to locate pdf's by extention in my queries, but I'm not able to crawl the pdf's and return the text from within the pdf's.

I admit I'm very new to solr/Sitecore, and this is probably easy to do, and it's just escaping me. I would like to try sitecore's built in filters before branching out to tika or pdfbox or something else.

With that, I've looked at my ContentSearch.Solr.DefaultIndexConfiguration.config, file and it **appears* to be setup properly for crawling pdfs.

ContentSearch.Solr.DefaultIndexConfiguration.config, excerpt:

    <field fieldName="_content"                       returnType="string"     type="Sitecore.ContentSearch.ComputedFields.MediaItemContentExtractor,Sitecore.ContentSearch">
            <mediaIndexing ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration/mediaIndexing"/>

and in my schema.xml file I have a line that reads:

    <field name="_content" type="text_general" indexed="true" stored="true" />

So it would seem that is configured correctly for crawling pdf files. I read on the Sitecore doc site that you also need adobe pdf ifilter v9 (as v11 has issues) so I have installed v9 and set the path in my environment variables & rebooted.

This all sounds fine and good, but now I'm stuck as to what to do next to be able to execute a query string search to return content from inside pdf's

Ex:

http://localhost:8983/solr/sitecore_web_index/select?hl=on&q=_content:[some pdf content here]&hl.fl=_content&fl=_content

The questions I have are:
1) How do I know the ifilter is doing anything / configured properly?
2) How do I activate it? (rebuild indexes? restart solr / Sitecore? Which i've done, multiple times)
3) What else I need to do to be able to perform the above query?

Update: After 3hrs of playing around with this, I have done a much more involved set of steps to get this to work and still no joy. They are as follows:

1) Downloaded adobe ifilter v9 / installed
2) Updated system environment variables path to include C:\Program Files\Adobe\Adobe PDF iFilter 9 for 64-bit platforms\bin\;
3) Copied pdffilter.dll from installed directory (C:\Program Files\Adobe\Adobe PDF iFilter 9 for 64-bit platforms\bin) to c:\windows\system32\inetsrv directory.
4) Edited web.config file to change impersonate to true -
5) Verified the following blocks exists in Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config

    <field fieldName="_content"  returnType="string" type="Sitecore.ContentSearch.ComputedFields.MediaItemContentExtractor,Sitecore.ContentSearch"> <mediaIndexing ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration/mediaIndexing"/>



application/pdf text/html text/plain

6) Added the following extension to the above file to the section just below the previous lines

    <extension>pdf</extension>


7) Deleted the "Website / App_Data / MediaCache" folder
8) Rebuilt sitecore index from rebuild index link in sitecore control panel
9) Cleared the sitecore cache - http: // {hostname} /sitecore/admin/cache.aspx
10) Reset IIS

Even after all of that, I still am not able to get Sitecore to crawl the content of pdf's. Did I miss a critical step somewhere?

thanks!

3

...Turns out, the thing I was missing, was that I only copied the pdffilter.dll in step 3, but actually I needed to copy all of the dll's from the installed folder to the inetsrv folder.

I believe this is what did the trick, and now it's all working as expected.

Note: As pointed out by Jrap, be sure to make sure that your application pool is running in 64bit (not 32bit) to be able to use the iFilter 64-bit dll's.

  • hoping you can edit your answer to include this bit- we were troubleshooting the same issue and in our case the app pool was set to run in 32-bit mode, which caused the app to not find the 64-bit IFilter DLL's. I imagine using the 32-bit version of the IFilter would work as well, but it was simply improperly set in our case. – jrap Jan 29 '18 at 16:46
  • That's a great point. I did use the 64bit version of the iFilter dll's, and my IIS app pool is set to 64bit by default (which was lucky for me I suppose)... but that's a great callout, something to watch out for, thanks! – Nick Jan 30 '18 at 18:32

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.