我无法对通过 FileStream 加载到 SQL 数据库中的 PDF 文件进行全文搜索。
版本:SQL Server 2008 R2(开发人员版 - 进行概念验证) 操作系统:Windows 7
我已采取的步骤。
- 安装了 Adobe iFilter
- 确保 SQL Server 全文守护程序服务正在运行
- 添加了 Adobe PDF Filter bin 目录的环境路径
运行以下脚本来设置新的 iFilter 并确保它是 活跃
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
在我想要索引的 FileStream 表上创建了全文索引
CREATE FULLTEXT INDEX on local.FILE_REPOSITORY (DOCUMENT TYPE COLUMN FILE_EXTENSION) Key Index PK_File_Repository ON (FileSearchCat, FILEGROUP [PRIMARY]); GO
重建目录
ALTER FULLTEXT CATALOG FileSearchCatREBUILD WITH ACCENT_SENSITIVITY=OFF;
运行查询以查看索引是否正常工作
select * from local.FILE_REPOSITORYwhere freetext(DOCUMENT, '25678')
对于 PDF 不返回任何结果,但对于 word (docx) 则可以正常工作?
我做错了什么?
最佳答案
好吧,我明白了......我需要运行这些步骤:
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
但还需要运行这个!!!!
reconfigure with override
关于sql-server - SQL Server PDF 全文搜索不适用于 FileStream PDF 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7690921/