SQL Server PDF Full-Text Search not working on FileStream PDF File

瘦欲@ 提交于 2019-12-18 02:49:22

问题


I cannot get the Full-Text search to work on PDF files I am loading into my SQL Db via FileStream.

Version: SQL Server 2008 R2 (Developer Edition - doing proof of concept) OS: Windows 7

Steps I have taken.

  • Installed the Adobe iFilter
  • Made sure SQL Server full Text Daemon service is running
  • Added the environment path to the Adobe PDF Filter bin directory
  • Ran the below scripts to setup the new iFilter and make sure it is active

    EXEC sp_fulltext_service @action='load_os_resources', @value=1; -- update os resources 
    EXEC sp_fulltext_service 'verify_signature', 0 -- don't verify signatures
    EXEC sp_fulltext_service 'update_languages'; -- update language list
    EXEC sp_fulltext_service 'restart_all_fdhosts'; -- restart daemon  
    EXEC sp_help_fulltext_system_components 'filter'; -- view active filters
    
  • Created the full-text index on the FileStream table I wanted to index

    CREATE FULLTEXT INDEX on local.FILE_REPOSITORY
    (DOCUMENT TYPE COLUMN FILE_EXTENSION)
    Key Index PK_File_Repository ON 
    (FileSearchCat, FILEGROUP [PRIMARY]);
    GO
    
  • Rebuilt Catalog

    ALTER FULLTEXT CATALOG FileSearchCatREBUILD WITH ACCENT_SENSITIVITY=OFF;
    
  • Ran a query to see if the index is working

    select * 
    from local.FILE_REPOSITORYwhere freetext(DOCUMENT, '25678')
    

Doesn't return any results for PDF, but works fine for word (docx)?

What am I doing wrong?


回答1:


Ok so I figured it out....I needed to run these steps:

EXEC sp_fulltext_service @action='load_os_resources', @value=1; -- update os resources 
EXEC sp_fulltext_service 'verify_signature', 0 -- don't verify signatures 
EXEC sp_fulltext_service 'update_languages'; -- update language list 
EXEC sp_fulltext_service 'restart_all_fdhosts'; -- restart daemon 
EXEC sp_help_fulltext_system_components 'filter'; -- view active filters

But Also needed to run this!!!!

reconfigure with override


来源:https://stackoverflow.com/questions/7690921/sql-server-pdf-full-text-search-not-working-on-filestream-pdf-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!