Introduction
In this article we will see how to create a full text search index for SQL Server
database for effective search. In so many cases we need to provide the search
facility in our application. To provide searching facility within our local
database we can use the greater feature provided by Microsoft SQL Server i.e. full text
index.
Background
When we want to use the full text index service we need to start the service
first else it will raise the errors. So let's start with how to start the service and
use the Full text index step by step.
Step 1
Open SQL Server and create a new database with the following table for eg.
Tbl_Search but keep in mind that the full text index only works on primary key or unique
key containing tables.
Create
Table Tbl_Search
(
Id
Int Primary
Key Identity(1,1),
Title Varchar(500),
[Desc]Varchar(max)
)
Insert some rows in the created table.
Step 2
Now we will create full text index on our database and table for providing
search in table. So create the Full Text Catalog on our database by using
following query.
CREATE
FULLTEXT CATALOG
FTSearch
In the query above we have created FullText Catalog with the name FTSearch.
Step 3
Now we will create full text index on our table Tbl_Search but for that we
require the unique key id or primary key id so find the id of unique or primary
key by using following command.
SELECT
* FROM
INFORMATION_SCHEMA.TABLE_CONSTRAINTS
This command will display the all constraint names on tables present in our
database from the output. Copy the Tbl_Search constraint name for creating a full
text index on TblSearch.
CREATE
FULLTEXT INDEX
ON Tbl_Search
11 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.

Gowtham RajamanickamPosted Apr 18, 2016, 9:13 AM
good concept
Maria JohnsonPosted Jan 4, 2012, 11:40 PM
Very good concept of your article. I was searching the same. Thanks for sharing.
Akash AhlawatPosted Jan 4, 2012, 11:59 AM
Thanks for explaining how to use FullTextIndex sevice
Michell JohnsonPosted Jan 4, 2012, 11:16 AM
It's a great work keep it up.
Jimmy UnderwoodPosted Jan 4, 2012, 11:09 AM
Really nice article
Manish SinghPosted Jan 4, 2012, 11:07 AM
Great work Krishna..
Akshay TeotiaPosted Jan 4, 2012, 11:04 AM
Nice work.
Vikas MishraPosted Jan 4, 2012, 10:41 AM
Hi Krishna you have done a very good work thanks for sharing.......
Emmy DickensPosted Jan 4, 2012, 12:43 AM
Helpful for me. So thanks to you for sharing