Wednesday, June 2, 2010

Creating a Full-Text Index using Indexed View

Since this isn't something I set up every day, I wanted to journal the process of creating a full text index using an indexed view.

First, you have to create your view, ensuring that there is a unique identifier - that is a prerequisite for creating an indexed view.

Secondly, you have to create the index using the following syntax:
CREATE UNIQUE CLUSTERED INDEX IX_ViewName_ColumnName ON ViewName (ColumnName)

Now that you have an indexed view, you can go ahead and create the full text index using that view.