Sql server 在SQL Server上对pdf文件进行全文搜索不会返回结果

Sql server 在SQL Server上对pdf文件进行全文搜索不会返回结果,sql-server,full-text-search,adobe,sql-server-2014,Sql Server,Full Text Search,Adobe,Sql Server 2014,我已经安装了Adobe IFilter,通过运行下面的查询更改了路径并创建了全文索引 CREATE TABLE ResearchReport ( ResearchReportID int identity(1,1), Report varbinary(max), Title nvarchar(100) not null, Summary nvarchar(300) not null, Author nvarchar(150) not null, Country

我已经安装了Adobe IFilter,通过运行下面的查询更改了路径并创建了全文索引

CREATE TABLE ResearchReport
(
   ResearchReportID int identity(1,1),
   Report varbinary(max),
   Title nvarchar(100) not null,
   Summary nvarchar(300) not null,
   Author nvarchar(150) not null,
   Country nvarchar(50) not null,
   Sector nvarchar(50) not null,
   Company nvarchar(50),
   Extension nvarchar(10) NOT NULL,
   CreationDate smalldatetime default getdate(),

   primary key(ResearchReportID)
);

EXEC sp_fulltext_database 'enable'
GO

IF NOT EXISTS (SELECT TOP 1 1 FROM sys.fulltext_catalogs WHERE name = 'Report_Catalog')
BEGIN
    EXEC sp_fulltext_catalog 'Report_Catalog', 'create';
END

DECLARE @indexName nvarchar(255) = (SELECT Top 1 i.Name from sys.indexes i
                                    Join sys.tables t on  i.object_id = t.object_id
                                    WHERE t.Name = 'ResearchReport' AND i.type_desc = 'CLUSTERED')

PRINT @indexName

EXEC sp_fulltext_table 'ResearchReport', 'create', 'Report_Catalog',  @indexName
EXEC sp_fulltext_column 'ResearchReport', 'Report', 'add', 0, 'Extension'
EXEC sp_fulltext_table 'ResearchReport', 'activate'
EXEC sp_fulltext_catalog 'Report_Catalog', 'start_full'

ALTER FULLTEXT INDEX ON [dbo].ResearchReport ENABLE
ALTER FULLTEXT INDEX ON [dbo].ResearchReport SET CHANGE_TRACKING = AUTO

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
选择*from ResearchReport查询返回结果,但当我想对下面的一个查询执行全文搜索时,我没有得到任何结果,会出现什么问题?我已经检查了stackoverflow和google上的大多数问题,但没有找到答案

SELECT r.* 
FROM dbo.ResearchReport r
WHERE Contains(r.Report, 'a')

SELECT * 
FROM ResearchReport 
WHERE freetext(Report, 'a')

SQL Server可以从全文索引中排除某些常见的单词,以防止它们变得臃肿

您可以尝试搜索更复杂的单词,或者关闭此索引的停止列表,以检查这是否是问题所在

ALTER FULLTEXT INDEX ON [dbo].ResearchReport SET STOPLIST = OFF
如果这是一个问题,并且您希望能够搜索“a”之类的术语,那么MSDN有一个关于管理stopwords的部分,应该很方便。

结果表明,Ifilter版本11没有真正经过测试。当我删除了11,安装了9,然后重新创建索引时,它工作得非常好。

无论关键词是字母、单词还是段落,搜索都不会工作。我使用的是sql server 2014,我希望这不是问题所在。