SQL Server PDF 全文搜索不适用于 FileStream PDF 文件

发布于 2024-12-08 20:27:01 字数 1096 浏览 3 评论 0原文

我无法对通过 FileStream 加载到 SQL 数据库中的 PDF 文件进行全文搜索。

版本:SQL Server 2008 R2(开发人员版 - 进行概念验证) 操作系统:Windows 7

我已采取的步骤。

  • 安装了 Adob​​e iFilter
  • 确保 SQL Server 全文守护程序服务正在运行
  • 将环境路径添加到 Adob​​e PDF Filter bin 目录
  • 运行以下脚本来设置新的 iFilter 并确保它已运行 活跃

    EXEC sp_fulltext_service @action='load_os_resources', @value=1; -- 更新操作系统资源 
    EXEC sp_fulltext_service 'verify_signature', 0 -- 不验证签名
    EXEC sp_fulltext_service 'update_languages'; -- 更新语言列表
    执行 sp_fulltext_service 'restart_all_fdhosts'; -- 重新启动守护进程  
    EXEC sp_help_fulltext_system_components '过滤器'; -- 查看活动过滤器
    
  • 在我想要索引的 FileStream 表上创建了全文索引

    在 local.FILE_REPOSITORY 上创建全文索引
    (文档类型列 FILE_EXTENSION)
    密钥索引 PK_File_Repository ON 
    (FileSearchCat, FILEGROUP [主]);
    去
    
  • 重建目录

    使用 ACCENT_SENSITIVITY=OFF 更改全文目录 FileSearchCatREBUILD;
    
  • 运行查询以查看索引是否正常工作

    <前><代码>选择* 来自 local.FILE_REPOSITORY,其中 freetext(DOCUMENT, '25678')

不会返回 PDF 的任何结果,但对于 word (docx) 工作正常?

我做错了什么?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧人 2024-12-15 20:27:01

好吧,我想明白了......我需要运行这些步骤:

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

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文