Full Text Search in SQL Server 2005 with varbinary(max)
-
Hi I have to upload PDF files in database. I am uploading PDFs as stream and inserting into a column of varbinary(max) type. A column also to store file type. So my database Table looks like docs(PDFStream,filetype). Here "PDFStream" is varbinary(max) "filetype" is varchar(10) I have the Full Text Index created on the table "docs". my problem is when I execute the following SELECT PDFStream FROM Docs WHERE FREETEXT (PDFStream, 'EQUIPMENT') Does not fetch any result. But I have uploaded the PDF file with a line '........EQUIPMENT SALE AGREEMENT ......' ( dots here are just indicates other texts ) Any idea where I am going wrong ??? Any help will be appreciated.
Thanks, Arindam D Tewary
-
Hi I have to upload PDF files in database. I am uploading PDFs as stream and inserting into a column of varbinary(max) type. A column also to store file type. So my database Table looks like docs(PDFStream,filetype). Here "PDFStream" is varbinary(max) "filetype" is varchar(10) I have the Full Text Index created on the table "docs". my problem is when I execute the following SELECT PDFStream FROM Docs WHERE FREETEXT (PDFStream, 'EQUIPMENT') Does not fetch any result. But I have uploaded the PDF file with a line '........EQUIPMENT SALE AGREEMENT ......' ( dots here are just indicates other texts ) Any idea where I am going wrong ??? Any help will be appreciated.
Thanks, Arindam D Tewary
I would guess that WHERE FREETEXT (PDFStream, 'EQUIPMENT') does not work because of the encoding maybe. Does WHERE FREETEXT (CAST(PDFStream as nvarchar(max)), 'EQUIPMENT') work. //I have never used varbinary and freetext so this advice comes with no warranty.
Dave Evans