These are the instructions to set up SharePoint to crawl and display pdfs in the results:
- Download the ifilter msi file from http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025
- Unzip the downloaded file and ensure the msi file is in a folder of your choice
- Find an icon for PDF and save it as ICPDF.gif to the same folder
- Create a new text file called ifilter-install.txt in the same folder and paste the following
# Enter the following variable…
$searchSSAName = "Search Service Application Name" #Enter the name of the Search Service Application here
Write-Host "Loading SharePoint 2010 PowerShell cmdlets – Global"
Add-PsSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
$ParentDirectory = Split-Path $pwd -parent
cmd.exe /C "$ParentDirectory\PDFFilter64installer.msi /passive"
write-host $ParentDirectory
copy-item "$ParentDirectory\ICPDF.gif" -Destination "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES\"
$pngmappingkey = ' <Mapping Key="png" Value="icpng.gif"/>'
$pdfmappingkey = ' <Mapping Key="pdf" Value="ICPDF.gif"/>'
$dociconxmlpath = "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML"
$dociconxmlentry = "$pngmappingkey`r`n$pdfmappingkey"
(get-content $dociconxmlpath\DOCICON.XML) | foreach-object {$_ -replace "$pngmappingkey", "$dociconxmlentry"} | set-content $dociconxmlpath\DOCICON.XML
New-Item -path "HKLM:\SOFTWARE\Microsoft\Office Server\14.0\Search\Setup\ContentIndexCommon\Filters\Extension\.pdf" -erroraction SilentlyContinue
New-ItemProperty "HKLM:\SOFTWARE\Microsoft\Office Server\14.0\Search\Setup\ContentIndexCommon\Filters\Extension\.pdf" -Name "(Default)" -PropertyType string -value "{E8978DA6-047F-4E3D-9C78-CDBE46041603}" -erroraction SilentlyContinue
$searchapp = Get-SPEnterpriseSearchServiceApplication $searchSSAName -erroraction SilentlyContinue
$searchapp | New-SPEnterpriseSearchCrawlExtension "pdf" -erroraction SilentlyContinue
cmd.exe /C iisreset
net stop "SharePoint Server Search 14″
net start "SharePoint Server Search 14″
- Open the ifilter-install.txt file and enter the $searchSSAName variable. This should be the exact name of the Search Service Application.
- Rename the attached ifilter-install.txt to ifilter.ps1
- Run the ps1 file on SP front-ends…
No comments:
Post a Comment