Quantcast
Channel: Forumul SQL Server Setup
Viewing all articles
Browse latest Browse all 7686

Getting started with FileStream/File Table full text search.

$
0
0

(SQLEXPRESS 2012 + Windows Server 2008R2)

I created a filestream database:

CREATE DATABASE FileStreamTest
ON
PRIMARY (NAME = FileStream1, 
		FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\FileStreamDat1.mdf'),
FILEGROUP FileStreamGroup1 CONTAINS FILESTREAM ( NAME= FileStream3, 
		FILENAME = 'F:\FileStream1')
LOG ON ( NAME = FileStreamLog1, 
		FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\FileStreamLog1.ldf')		
GO	

Then I created a table (Documents) & I next created a full text catalog and index:

create fulltext catalog FileStreamFTCatalog AS DEFAULT
Create fulltext index on dbo.Documents
(Title, Text TYPE COLUMN TextType)
Key INDEX PK_Document
ON FileStreamFTCatalog
WITH Change_Tracking AUTO

I added a file named "This is a text.docx" and "This is a text.pdf"  The content of both files was "This is a test."

So now I search with query:

Select DcoumnetID, Title
FROM Documents
WHERE CONTAINS (Text, 'This')

I get nothing.  I thought both files would showed up.  What am I doing wrong?

THANKS!

fulltextcatalogFileStreamFTCatalogASDEFAULT

Create

fulltextindexondbo.Documents

(

Title,TextTYPECOLUMNTextType)

Key

INDEXPK_Document

ON

FileStreamFTCatalog

WITH

Change_TrackingAUTO


Viewing all articles
Browse latest Browse all 7686

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>